diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e0e9a6e620f..c3792c85dd6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10401,8 +10401,6 @@ namespace ts { } function checkStringLiteralExpression(node: StringLiteral): Type { - // TODO (drosen): Do we want to apply the same approach to no-sub template literals? - const contextualType = getContextualType(node); if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { return getStringLiteralType(node); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f536a1e4693..d3cf86fed12 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -701,7 +701,7 @@ namespace ts { } // Note that a StringLiteral AST node is both an Expression and a TypeNode. The latter is - // because string literals can appear in the type annotation of a parameter node. + // because string literals can appear in type annotations as well. export interface StringLiteral extends LiteralExpression, TypeNode { _stringLiteralBrand: any; }