Skip to main content

escape_ts_string

Function escape_ts_string 

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

The one TypeScript string-literal escaper lives in bynk_ts (crate-hygiene A2); the emitter keeps its historical name for it. Escapes a string for embedding in a TypeScript double-quoted string literal. The one definition: the printer’s TsLit::Str, bynk-emit’s escape_ts_string and bynk-check’s wire defaults all splice into generated TypeScript and must never disagree.