Skip to main content

escape_ts_literal

Function escape_ts_literal 

Source
pub fn escape_ts_literal(s: &str) -> String
Expand description

Escapes a string for embedding in a TypeScript double-quoted string literal. pub because bynk-emit’s escape_ts_string (~65 call sites across the emitter’s real emission code) delegates here rather than keeping its own copy — the two must stay byte-identical since both splice into generated TypeScript, so this is the one shared definition.