Skip to content

Commit fec0aaa

Browse files
committed
Apply code quality improvements
1 parent a253692 commit fec0aaa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/extract/TypeScriptSourceFile.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ export class TypeScriptSourceFile {
8989
if (ts.isNoSubstitutionTemplateLiteral(tpl)) {
9090
templateString = escapeKey(tpl.text);
9191
} 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);
92+
let templateParts = escapeKey(tpl.head.text);
93+
tpl.templateSpans.forEach((span, index) => {
94+
templateParts += "{" + index + "}" + escapeKey(span.literal.text);
9695
});
97-
templateString = parts;
96+
templateString = templateParts;
9897
} else {
9998
templateString = "";
10099
}

0 commit comments

Comments
 (0)