@@ -1362,7 +1362,6 @@ export type HasIllegalModifiers =
13621362 | PropertyAssignment
13631363 | ShorthandPropertyAssignment
13641364 | MissingDeclaration
1365- | FunctionTypeNode
13661365 | NamespaceExportDeclaration
13671366 ;
13681367
@@ -1801,7 +1800,7 @@ export interface TypeParameterDeclaration extends NamedDeclaration, JSDocContain
18011800 readonly constraint ?: TypeNode ;
18021801 readonly default ?: TypeNode ;
18031802
1804- // For error recovery purposes.
1803+ // For error recovery purposes (see `isGrammarError` in utilities.ts) .
18051804 expression ?: Expression ;
18061805}
18071806
@@ -1888,7 +1887,7 @@ export interface PropertySignature extends TypeElement, JSDocContainer {
18881887 readonly questionToken ?: QuestionToken ; // Present on optional property
18891888 readonly type ?: TypeNode ; // Optional type annotation
18901889
1891- // The following properties are used only to report grammar errors
1890+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
18921891 /** @internal */ readonly initializer ?: Expression | undefined ; // A property signature cannot have an initializer
18931892}
18941893
@@ -1897,7 +1896,7 @@ export interface PropertyDeclaration extends ClassElement, JSDocContainer {
18971896 readonly parent : ClassLikeDeclaration ;
18981897 readonly modifiers ?: NodeArray < ModifierLike > ;
18991898 readonly name : PropertyName ;
1900- readonly questionToken ?: QuestionToken ; // Present for use with reporting a grammar error
1899+ readonly questionToken ?: QuestionToken ; // Present for use with reporting a grammar error for auto-accessors (see `isGrammarError` in utilities.ts)
19011900 readonly exclamationToken ?: ExclamationToken ;
19021901 readonly type ?: TypeNode ;
19031902 readonly initializer ?: Expression ; // Optional initializer
@@ -1960,7 +1959,7 @@ export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer
19601959 readonly name : PropertyName ;
19611960 readonly initializer : Expression ;
19621961
1963- // The following properties are used only to report grammar errors
1962+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
19641963 /** @internal */ readonly modifiers ?: NodeArray < ModifierLike > | undefined ; // property assignment cannot have decorators or modifiers
19651964 /** @internal */ readonly questionToken ?: QuestionToken | undefined ; // property assignment cannot have a question token
19661965 /** @internal */ readonly exclamationToken ?: ExclamationToken | undefined ; // property assignment cannot have an exclamation token
@@ -1971,11 +1970,11 @@ export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDoc
19711970 readonly parent : ObjectLiteralExpression ;
19721971 readonly name : Identifier ;
19731972 // used when ObjectLiteralExpression is used in ObjectAssignmentPattern
1974- // it is a grammar error to appear in actual object initializer:
1973+ // it is a grammar error to appear in actual object initializer (see `isGrammarError` in utilities.ts) :
19751974 readonly equalsToken ?: EqualsToken ;
19761975 readonly objectAssignmentInitializer ?: Expression ;
19771976
1978- // The following properties are used only to report grammar errors
1977+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
19791978 /** @internal */ readonly modifiers ?: NodeArray < ModifierLike > | undefined ; // shorthand property assignment cannot have decorators or modifiers
19801979 /** @internal */ readonly questionToken ?: QuestionToken | undefined ; // shorthand property assignment cannot have a question token
19811980 /** @internal */ readonly exclamationToken ?: ExclamationToken | undefined ; // shorthand property assignment cannot have an exclamation token
@@ -2076,7 +2075,7 @@ export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassEle
20762075 readonly name : PropertyName ;
20772076 readonly body ?: FunctionBody | undefined ;
20782077
2079- // The following properties are used only to report grammar errors
2078+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
20802079 /** @internal */ readonly exclamationToken ?: ExclamationToken | undefined ; // A method cannot have an exclamation token
20812080}
20822081
@@ -2086,7 +2085,7 @@ export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, Cla
20862085 readonly modifiers ?: NodeArray < ModifierLike > | undefined ;
20872086 readonly body ?: FunctionBody | undefined ;
20882087
2089- // The following properties are used only to report grammar errors
2088+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
20902089 /** @internal */ readonly typeParameters ?: NodeArray < TypeParameterDeclaration > ; // A constructor cannot have type parameters
20912090 /** @internal */ readonly type ?: TypeNode ; // A constructor cannot have a return type annotation
20922091}
@@ -2106,7 +2105,7 @@ export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, Cla
21062105 readonly name : PropertyName ;
21072106 readonly body ?: FunctionBody ;
21082107
2109- // The following properties are used only to report grammar errors
2108+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
21102109 /** @internal */ readonly typeParameters ?: NodeArray < TypeParameterDeclaration > | undefined ; // A get accessor cannot have type parameters
21112110}
21122111
@@ -2119,7 +2118,7 @@ export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, Cla
21192118 readonly name : PropertyName ;
21202119 readonly body ?: FunctionBody ;
21212120
2122- // The following properties are used only to report grammar errors
2121+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
21232122 /** @internal */ readonly typeParameters ?: NodeArray < TypeParameterDeclaration > | undefined ; // A set accessor cannot have type parameters
21242123 /** @internal */ readonly type ?: TypeNode | undefined ; // A set accessor cannot have a return type
21252124}
@@ -2141,7 +2140,7 @@ export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContaine
21412140 /** @internal */ endFlowNode ?: FlowNode ;
21422141 /** @internal */ returnFlowNode ?: FlowNode ;
21432142
2144- // The following properties are used only to report grammar errors
2143+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
21452144 /** @internal */ readonly modifiers ?: NodeArray < ModifierLike > | undefined ;
21462145}
21472146
@@ -2190,8 +2189,8 @@ export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDe
21902189export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase , LocalsContainer {
21912190 readonly kind : SyntaxKind . FunctionType ;
21922191
2193- // The following properties are used only to report grammar errors
2194- /** @internal */ readonly modifiers ?: NodeArray < Modifier > | undefined ;
2192+ // A function type cannot have modifiers
2193+ /** @internal */ readonly modifiers ?: undefined ;
21952194}
21962195
21972196export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase , LocalsContainer {
@@ -3723,7 +3722,7 @@ export interface NamespaceExportDeclaration extends DeclarationStatement, JSDocC
37233722 readonly kind : SyntaxKind . NamespaceExportDeclaration ;
37243723 readonly name : Identifier ;
37253724
3726- // The following properties are used only to report grammar errors
3725+ // The following properties are used only to report grammar errors (see `isGrammarError` in utilities.ts)
37273726 /** @internal */ readonly modifiers ?: NodeArray < ModifierLike > | undefined ;
37283727}
37293728
0 commit comments