benjamn / ast-types

Esprima-compatible implementation of the Mozilla JS Parser API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArrayPattern field names def and type def is missing typeAnnotation property

jedwards1211 opened this issue · comments

gen/nodes.d.ts has the following. Notice how ObjectPattern has a typeAnnotation field but ArrayPattern is missing it.

export interface ObjectPattern extends Omit<Pattern, "type"> {
    type: "ObjectPattern";
    properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[];
    typeAnnotation: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
    decorators: K.DecoratorKind[] | null;
}
export interface ArrayPattern extends Omit<Pattern, "type"> {
    type: "ArrayPattern";
    elements: (K.PatternKind | K.SpreadElementKind | null)[];
}

just discovered the field names runtime values are missing typeAnnotation as well.