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. 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.