File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ import {
451
451
isBlock,
452
452
isBlockOrCatchScoped,
453
453
isBlockScopedContainerTopLevel,
454
+ isBooleanLiteral,
454
455
isCallChain,
455
456
isCallExpression,
456
457
isCallLikeExpression,
@@ -599,6 +600,7 @@ import {
599
600
isLet,
600
601
isLineBreak,
601
602
isLiteralComputedPropertyDeclarationName,
603
+ isLiteralExpression,
602
604
isLiteralExpressionOfObject,
603
605
isLiteralImportTypeNode,
604
606
isLiteralTypeNode,
@@ -37189,8 +37191,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
37189
37191
else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
37190
37192
return getTypeFromTypeNode((expr as TypeAssertion).type);
37191
37193
}
37192
- else if (node.kind === SyntaxKind.NumericLiteral || node.kind === SyntaxKind.StringLiteral ||
37193
- node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) {
37194
+ else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
37194
37195
return checkExpression(node);
37195
37196
}
37196
37197
return undefined;
You can’t perform that action at this time.
0 commit comments