MCPcopy Index your code
hub / github.com/nodejs/node / escapingWrite

Function escapingWrite

test/fixtures/snapshot/typescript.js:132845–132856  ·  view source on GitHub ↗
(s, write)

Source from the content-addressed store, hash-verified

132843 // generate a set of changes that can be applied to the unescaped text
132844 // to escape it post-formatting.
132845 function escapingWrite(s, write) {
132846 var escaped = ts.escapeSnippetText(s);
132847 if (escaped !== s) {
132848 var start = baseWriter.getTextPos();
132849 write();
132850 var end = baseWriter.getTextPos();
132851 escapes = ts.append(escapes || (escapes = []), { newText: escaped, span: { start: start, length: end - start } });
132852 }
132853 else {
132854 write();
132855 }
132856 }
132857 /* Snippet-escaping version of `printer.printList`. */
132858 function printSnippetList(format, list, sourceFile) {
132859 var unescaped = printUnescapedSnippetList(format, list, sourceFile);

Callers 1

createSnippetPrinterFunction · 0.85

Calls 2

writeFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…