We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58427c4 commit d3c9815Copy full SHA for d3c9815
1 file changed
src/compiler/checker.ts
@@ -15969,7 +15969,7 @@ namespace ts {
15969
return grammarErrorOnNode((<ShorthandPropertyAssignment>prop).equalsToken, Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
15970
}
15971
15972
- // Modifiers cannot appear in property assignments
+ // Modifiers are never allowed on properties except for 'async' on a method declaration
15973
forEach(prop.modifiers, mod => {
15974
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
15975
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
0 commit comments