Skip to content

Commit d3c9815

Browse files
committed
Improve comment
1 parent 58427c4 commit d3c9815

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15969,7 +15969,7 @@ namespace ts {
1596915969
return grammarErrorOnNode((<ShorthandPropertyAssignment>prop).equalsToken, Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
1597015970
}
1597115971

15972-
// Modifiers cannot appear in property assignments
15972+
// Modifiers are never allowed on properties except for 'async' on a method declaration
1597315973
forEach(prop.modifiers, mod => {
1597415974
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
1597515975
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));

0 commit comments

Comments
 (0)