Skip to content

Commit b9fa0af

Browse files
committed
Fixing the fix
1 parent ad1c9b9 commit b9fa0af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3094,7 +3094,7 @@ namespace ts {
30943094
// Use the type of the initializer expression if one is present
30953095
if (declaration.initializer) {
30963096
const exprType = checkExpressionCached(declaration.initializer);
3097-
const type = getCombinedModifierFlags(declaration) & (ModifierFlags.Const | ModifierFlags.Readonly) ? exprType : getBaseTypeOfLiteralType(exprType);
3097+
const type = getCombinedNodeFlags(declaration) & NodeFlags.Const || getCombinedModifierFlags(declaration) & ModifierFlags.Readonly ? exprType : getBaseTypeOfLiteralType(exprType);
30983098
return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality);
30993099
}
31003100

0 commit comments

Comments
 (0)