mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Fix merge issue
This commit is contained in:
@@ -3094,7 +3094,7 @@ namespace ts {
|
||||
// Use the type of the initializer expression if one is present
|
||||
if (declaration.initializer) {
|
||||
const exprType = checkExpressionCached(declaration.initializer);
|
||||
const type = getCombinedNodeFlags(declaration) & (NodeFlags.Const | NodeFlags.Readonly) ? exprType : getBaseTypeOfLiteralType(exprType);
|
||||
const type = getCombinedModifierFlags(declaration) & (ModifierFlags.Const | ModifierFlags.Readonly) ? exprType : getBaseTypeOfLiteralType(exprType);
|
||||
return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user