We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a253692 commit fec0aaaCopy full SHA for fec0aaa
lib/extract/TypeScriptSourceFile.ts
@@ -89,12 +89,11 @@ export class TypeScriptSourceFile {
89
if (ts.isNoSubstitutionTemplateLiteral(tpl)) {
90
templateString = escapeKey(tpl.text);
91
} else if (ts.isTemplateExpression(tpl)) {
92
- let parts = escapeKey(tpl.head.text);
93
- tpl.templateSpans.forEach((_, index) => {
94
- const span = tpl.templateSpans[index];
95
- parts += "{" + index + "}" + escapeKey(span.literal.text);
+ let templateParts = escapeKey(tpl.head.text);
+ tpl.templateSpans.forEach((span, index) => {
+ templateParts += "{" + index + "}" + escapeKey(span.literal.text);
96
});
97
- templateString = parts;
+ templateString = templateParts;
98
} else {
99
templateString = "";
100
}
0 commit comments