mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Const.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user