Support TS 4.3 static index signature in classes (#13096)
This commit is contained in:
@@ -1709,6 +1709,7 @@ export interface TSIndexSignature extends BaseNode {
|
||||
parameters: Array<Identifier>;
|
||||
typeAnnotation?: TSTypeAnnotation | null;
|
||||
readonly?: boolean | null;
|
||||
static?: boolean | null;
|
||||
}
|
||||
|
||||
export interface TSAnyKeyword extends BaseNode {
|
||||
|
||||
@@ -126,6 +126,7 @@ defineType("TSIndexSignature", {
|
||||
visitor: ["parameters", "typeAnnotation"],
|
||||
fields: {
|
||||
readonly: validateOptional(bool),
|
||||
static: validateOptional(bool),
|
||||
parameters: validateArrayOfType("Identifier"), // Length must be 1
|
||||
typeAnnotation: validateOptionalType("TSTypeAnnotation"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user