mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:36:43 -06:00
Updated condition for more readability
This commit is contained in:
parent
78bb276216
commit
2eba10a25b
@ -1006,11 +1006,10 @@ namespace ts {
|
||||
return;
|
||||
}
|
||||
// pass through
|
||||
let isConstInvalid = true;
|
||||
case SyntaxKind.VariableStatement:
|
||||
// Check modifiers
|
||||
if (nodes === (<ClassDeclaration | FunctionLikeDeclaration | VariableStatement>parent).modifiers) {
|
||||
return checkModifiers(<NodeArray<Modifier>>nodes, !isConstInvalid);
|
||||
return checkModifiers(<NodeArray<Modifier>>nodes, parent.kind === SyntaxKind.VariableStatement);
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.PropertyDeclaration:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user