We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 964fbea commit 58427c4Copy full SHA for 58427c4
1 file changed
src/compiler/checker.ts
@@ -15971,10 +15971,7 @@ namespace ts {
15971
15972
// Modifiers cannot appear in property assignments
15973
forEach(prop.modifiers, mod => {
15974
- if (mod.kind !== SyntaxKind.AsyncKeyword) {
15975
- grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
15976
- }
15977
- else if (prop.kind !== SyntaxKind.MethodDeclaration) {
+ if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
15978
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
15979
}
15980
});
0 commit comments