MCPcopy Create free account
hub / github.com/nodejs/node / escapeTemplateSubstitution

Function escapeTemplateSubstitution

test/fixtures/snapshot/typescript.js:18067–18069  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

18065 ts.createDiagnosticCollection = createDiagnosticCollection;
18066 var templateSubstitutionRegExp = /\$\{/g;
18067 function escapeTemplateSubstitution(str) {
18068 return str.replace(templateSubstitutionRegExp, "\\${");
18069 }
18070 /** @internal */
18071 function hasInvalidEscape(template) {
18072 return template && !!(ts.isNoSubstitutionTemplateLiteral(template)

Callers 1

getLiteralTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected