diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 44dcc423e8f..e0e9a6e620f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10403,7 +10403,7 @@ namespace ts { function checkStringLiteralExpression(node: StringLiteral): Type { // TODO (drosen): Do we want to apply the same approach to no-sub template literals? - let contextualType = getContextualType(node); + const contextualType = getContextualType(node); if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { return getStringLiteralType(node); }