1// Type definitions for babel-types 7.0
2// Project: https://github.com/babel/babel/tree/master/packages/babel-types, https://babeljs.io
3// Definitions by: Troy Gerwien <https://github.com/yortus>
4//                 Sam Baxter <https://github.com/baxtersa>
5//                 Marvin Hagemeister <https://github.com/marvinhagemeister>
6//                 Boris Cherny <https://github.com/bcherny>
7//                 ExE Boss <https://github.com/ExE-Boss>
8// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
9
10export interface Comment {
11    value: string;
12    start: number;
13    end: number;
14    loc: SourceLocation;
15}
16
17export interface CommentBlock extends Comment {
18    type: "CommentBlock";
19}
20
21export interface CommentLine extends Comment {
22    type: "CommentLine";
23}
24
25export interface SourceLocation {
26    start: {
27        line: number;
28        column: number;
29    };
30
31    end: {
32        line: number;
33        column: number;
34    };
35}
36
37export interface Node {
38    type: string;
39    leadingComments?: Comment[] | undefined;
40    innerComments?: Comment[] | undefined;
41    trailingComments?: Comment[] | undefined;
42    start: number;
43    end: number;
44    loc: SourceLocation;
45}
46
47export interface ArrayExpression extends Node {
48    type: "ArrayExpression";
49    elements: Array<null | Expression | SpreadElement>;
50}
51
52export interface AssignmentExpression extends Node {
53    type: "AssignmentExpression";
54    operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=";
55    left: LVal;
56    right: Expression;
57}
58
59export interface BinaryExpression extends Node {
60    type: "BinaryExpression";
61    operator:
62        | "+"
63        | "-"
64        | "/"
65        | "%"
66        | "*"
67        | "**"
68        | "&"
69        | "|"
70        | ">>"
71        | ">>>"
72        | "<<"
73        | "^"
74        | "=="
75        | "==="
76        | "!="
77        | "!=="
78        | "in"
79        | "instanceof"
80        | ">"
81        | "<"
82        | ">="
83        | "<=";
84    left: Expression;
85    right: Expression;
86}
87
88export interface Directive extends Node {
89    type: "Directive";
90    value: DirectiveLiteral;
91}
92
93export interface DirectiveLiteral extends Node {
94    type: "DirectiveLiteral";
95    value: string;
96}
97
98export interface BlockStatement extends Node {
99    type: "BlockStatement";
100    directives?: Directive[] | undefined;
101    body: Statement[];
102}
103
104export interface BreakStatement extends Node {
105    type: "BreakStatement";
106    label: Identifier;
107}
108
109export interface CallExpression extends Node {
110    type: "CallExpression";
111    callee: Expression | Super;
112    arguments: Array<Expression | SpreadElement>;
113}
114
115export interface CatchClause extends Node {
116    type: "CatchClause";
117    param: Identifier;
118    body: BlockStatement;
119}
120
121export interface ConditionalExpression extends Node {
122    type: "ConditionalExpression";
123    test: Expression;
124    consequent: Expression;
125    alternate: Expression;
126}
127
128export interface ContinueStatement extends Node {
129    type: "ContinueStatement";
130    label: Identifier;
131}
132
133export interface DebuggerStatement extends Node {
134    type: "DebuggerStatement";
135}
136
137export interface DoWhileStatement extends Node {
138    type: "DoWhileStatement";
139    test: Expression;
140    body: Statement;
141}
142
143export interface EmptyStatement extends Node {
144    type: "EmptyStatement";
145}
146
147export interface ExpressionStatement extends Node {
148    type: "ExpressionStatement";
149    expression: Expression;
150}
151
152export interface File extends Node {
153    type: "File";
154    program: Program;
155    comments: Comment[];
156    tokens: any[];
157}
158
159export interface ForInStatement extends Node {
160    type: "ForInStatement";
161    left: VariableDeclaration | LVal;
162    right: Expression;
163    body: Statement;
164}
165
166export interface ForStatement extends Node {
167    type: "ForStatement";
168    init: VariableDeclaration | Expression;
169    test: Expression;
170    update: Expression;
171    body: Statement;
172}
173
174export interface FunctionDeclaration extends Node {
175    type: "FunctionDeclaration";
176    id: Identifier;
177    params: LVal[];
178    body: BlockStatement;
179    generator: boolean;
180    async: boolean;
181    returnType?: TypeAnnotation | undefined;
182    typeParameters?: TypeParameterDeclaration | undefined;
183}
184
185export interface FunctionExpression extends Node {
186    type: "FunctionExpression";
187    id: Identifier;
188    params: LVal[];
189    body: BlockStatement;
190    generator: boolean;
191    async: boolean;
192    returnType?: TypeAnnotation | undefined;
193    typeParameters?: TypeParameterDeclaration | undefined;
194}
195
196export interface Identifier extends Node {
197    type: "Identifier";
198    name: string;
199    typeAnnotation?: TypeAnnotation | undefined;
200}
201
202export interface IfStatement extends Node {
203    type: "IfStatement";
204    test: Expression;
205    consequent: Statement;
206    alternate: Statement;
207}
208
209export interface LabeledStatement extends Node {
210    type: "LabeledStatement";
211    label: Identifier;
212    body: Statement;
213}
214
215export interface StringLiteral extends Node {
216    type: "StringLiteral";
217    value: string;
218}
219
220export interface NumericLiteral extends Node {
221    type: "NumericLiteral";
222    value: number;
223}
224
225export interface NullLiteral extends Node {
226    type: "NullLiteral";
227}
228
229export interface BooleanLiteral extends Node {
230    type: "BooleanLiteral";
231    value: boolean;
232}
233
234export interface RegExpLiteral extends Node {
235    type: "RegExpLiteral";
236    pattern: string;
237    flags?: string | undefined;
238}
239
240export interface LogicalExpression extends Node {
241    type: "LogicalExpression";
242    operator: "||" | "&&";
243    left: Expression;
244    right: Expression;
245}
246
247export interface MemberExpression extends Node {
248    type: "MemberExpression";
249    object: Expression | Super;
250    property: Expression;
251    computed: boolean;
252}
253
254export interface NewExpression extends Node {
255    type: "NewExpression";
256    callee: Expression | Super;
257    arguments: Array<Expression | SpreadElement>;
258}
259
260export interface Program extends Node {
261    type: "Program";
262    sourceType: "script" | "module";
263    directives?: Directive[] | undefined;
264    body: Array<Statement | ModuleDeclaration>;
265}
266
267export interface ObjectExpression extends Node {
268    type: "ObjectExpression";
269    properties: Array<ObjectProperty | ObjectMethod | SpreadProperty>;
270}
271
272export interface ObjectMethod extends Node {
273    type: "ObjectMethod";
274    key: Expression;
275    kind: "get" | "set" | "method";
276    shorthand: boolean;
277    computed: boolean;
278    value: Expression;
279    decorators?: Decorator[] | undefined;
280    id: Identifier;
281    params: LVal[];
282    body: BlockStatement;
283    generator: boolean;
284    async: boolean;
285    returnType?: TypeAnnotation | undefined;
286    typeParameters?: TypeParameterDeclaration | undefined;
287}
288
289export interface ObjectProperty extends Node {
290    type: "ObjectProperty";
291    key: Expression;
292    computed: boolean;
293    value: Expression;
294    decorators?: Decorator[] | undefined;
295    shorthand: boolean;
296}
297
298export interface RestElement extends Node {
299    type: "RestElement";
300    argument: LVal;
301    typeAnnotation?: TypeAnnotation | undefined;
302}
303
304export interface ReturnStatement extends Node {
305    type: "ReturnStatement";
306    argument: Expression;
307}
308
309export interface SequenceExpression extends Node {
310    type: "SequenceExpression";
311    expressions: Expression[];
312}
313
314export interface SwitchCase extends Node {
315    type: "SwitchCase";
316    test: Expression;
317    consequent: Statement[];
318}
319
320export interface SwitchStatement extends Node {
321    type: "SwitchStatement";
322    discriminant: Expression;
323    cases: SwitchCase[];
324}
325
326export interface ThisExpression extends Node {
327    type: "ThisExpression";
328}
329
330export interface ThrowStatement extends Node {
331    type: "ThrowStatement";
332    argument: Expression;
333}
334
335export interface TryStatement extends Node {
336    type: "TryStatement";
337    block: BlockStatement;
338    handler: CatchClause;
339    finalizer: BlockStatement;
340}
341
342export interface UnaryExpression extends Node {
343    type: "UnaryExpression";
344    operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
345    prefix: boolean;
346    argument: Expression;
347}
348
349export interface UpdateExpression extends Node {
350    type: "UpdateExpression";
351    operator: "++" | "--";
352    prefix: boolean;
353    argument: Expression;
354}
355
356export interface VariableDeclaration extends Node {
357    type: "VariableDeclaration";
358    declarations: VariableDeclarator[];
359    kind: "var" | "let" | "const";
360}
361
362export interface VariableDeclarator extends Node {
363    type: "VariableDeclarator";
364    id: LVal;
365    init: Expression;
366}
367
368export interface WhileStatement extends Node {
369    type: "WhileStatement";
370    test: Expression;
371    body: Statement;
372}
373
374export interface WithStatement extends Node {
375    type: "WithStatement";
376    object: Expression;
377    body: BlockStatement | Statement;
378}
379
380export interface AssignmentPattern extends Node {
381    type: "AssignmentPattern";
382    left: Identifier;
383    right: Expression;
384}
385
386export interface ArrayPattern extends Node {
387    type: "ArrayPattern";
388    elements: Expression[];
389    typeAnnotation?: TypeAnnotation | undefined;
390}
391
392export interface ArrowFunctionExpression extends Node {
393    type: "ArrowFunctionExpression";
394    id: Identifier;
395    params: LVal[];
396    body: BlockStatement | Expression;
397    generator: boolean;
398    async: boolean;
399    expression: boolean;
400    returnType?: TypeAnnotation | undefined;
401    typeParameters?: TypeParameterDeclaration | undefined;
402}
403
404export interface ClassBody extends Node {
405    type: "ClassBody";
406    body: Array<ClassMethod | ClassProperty>;
407}
408
409export interface ClassDeclaration extends Node {
410    type: "ClassDeclaration";
411    id: Identifier;
412    superClass: Expression;
413    body: ClassBody;
414    decorators?: Decorator[] | undefined;
415    implements?: ClassImplements[] | undefined;
416    mixins?: any[] | undefined;
417    typeParameters?: TypeParameterDeclaration | undefined;
418    superTypeParameters?: TypeParameterInstantiation | undefined;
419}
420
421export interface ClassExpression extends Node {
422    type: "ClassExpression";
423    id: Identifier;
424    superClass: Expression;
425    body: ClassBody;
426    decorators?: Decorator[] | undefined;
427    implements?: ClassImplements[] | undefined;
428    mixins?: any[] | undefined;
429    typeParameters?: TypeParameterDeclaration | undefined;
430    superTypeParameters?: TypeParameterInstantiation | undefined;
431}
432
433export interface ExportAllDeclaration extends Node {
434    type: "ExportAllDeclaration";
435    source: StringLiteral;
436}
437
438export interface ExportDefaultDeclaration extends Node {
439    type: "ExportDefaultDeclaration";
440    declaration: Declaration | Expression;
441}
442
443export interface ExportNamedDeclaration extends Node {
444    type: "ExportNamedDeclaration";
445    declaration: Declaration;
446    specifiers: ExportSpecifier[];
447    source: StringLiteral | null;
448}
449
450export interface ExportSpecifier extends Node {
451    type: "ExportSpecifier";
452    local: Identifier;
453    imported: Identifier;
454    exported: Identifier;
455}
456
457export interface ForOfStatement extends Node {
458    type: "ForOfStatement";
459    left: VariableDeclaration | LVal;
460    right: Expression;
461    body: Statement;
462}
463
464export interface ImportDeclaration extends Node {
465    type: "ImportDeclaration";
466    specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
467    source: StringLiteral;
468}
469
470export interface ImportDefaultSpecifier extends Node {
471    type: "ImportDefaultSpecifier";
472    local: Identifier;
473}
474
475export interface ImportNamespaceSpecifier extends Node {
476    type: "ImportNamespaceSpecifier";
477    local: Identifier;
478}
479
480export interface ImportSpecifier extends Node {
481    type: "ImportSpecifier";
482    local: Identifier;
483    imported: Identifier;
484}
485
486export interface MetaProperty extends Node {
487    type: "MetaProperty";
488    meta: Identifier;
489    property: Identifier;
490}
491
492export interface ClassMethod extends Node {
493    type: "ClassMethod";
494    key: Expression;
495    value?: FunctionExpression | undefined;
496    kind: "constructor" | "method" | "get" | "set";
497    computed: boolean;
498    static: boolean;
499    decorators?: Decorator[] | undefined;
500    id: Identifier;
501    params: LVal[];
502    body: BlockStatement;
503    generator: boolean;
504    async: boolean;
505    expression: boolean;
506    returnType?: TypeAnnotation | undefined;
507    typeParameters?: TypeParameterDeclaration | undefined;
508}
509
510// See: https://github.com/babel/babel/blob/master/doc/ast/spec.md#objectpattern
511export interface AssignmentProperty extends Node {
512    type: "ObjectProperty";
513    key: Expression;
514    computed: boolean;
515    value: Pattern;
516    decorators?: Decorator[] | undefined;
517    shorthand: boolean;
518}
519
520export interface ObjectPattern extends Node {
521    type: "ObjectPattern";
522    properties: Array<AssignmentProperty | RestProperty>;
523    typeAnnotation?: TypeAnnotation | undefined;
524}
525
526export interface SpreadElement extends Node {
527    type: "SpreadElement";
528    argument: Expression;
529}
530
531export interface Super extends Node {
532    type: "Super";
533}
534
535export interface TaggedTemplateExpression extends Node {
536    type: "TaggedTemplateExpression";
537    tag: Expression;
538    quasi: TemplateLiteral;
539}
540
541export interface TemplateElement extends Node {
542    type: "TemplateElement";
543    tail: boolean;
544    value: {
545        cooked: string;
546        raw: string;
547    };
548}
549
550export interface TemplateLiteral extends Node {
551    type: "TemplateLiteral";
552    quasis: TemplateElement[];
553    expressions: Expression[];
554}
555
556export interface YieldExpression extends Node {
557    type: "YieldExpression";
558    argument: Expression;
559    delegate: boolean;
560}
561
562export interface AnyTypeAnnotation extends Node {
563    type: "AnyTypeAnnotation";
564}
565
566export interface ArrayTypeAnnotation extends Node {
567    type: "ArrayTypeAnnotation";
568    elementType: FlowTypeAnnotation;
569}
570
571export interface BooleanTypeAnnotation extends Node {
572    type: "BooleanTypeAnnotation";
573}
574
575export interface BooleanLiteralTypeAnnotation extends Node {
576    type: "BooleanLiteralTypeAnnotation";
577}
578
579export interface NullLiteralTypeAnnotation extends Node {
580    type: "NullLiteralTypeAnnotation";
581}
582
583export interface ClassImplements extends Node {
584    type: "ClassImplements";
585    id: Identifier;
586    typeParameters: TypeParameterInstantiation;
587}
588
589export interface ClassProperty extends Node {
590    type: "ClassProperty";
591    key: Identifier;
592    value: Expression;
593    decorators?: Decorator[] | undefined;
594    typeAnnotation?: TypeAnnotation | undefined;
595}
596
597export interface DeclareClass extends Node {
598    type: "DeclareClass";
599    id: Identifier;
600    typeParameters: TypeParameterDeclaration;
601    extends: InterfaceExtends[];
602    body: ObjectTypeAnnotation;
603}
604
605export interface DeclareFunction extends Node {
606    type: "DeclareFunction";
607    id: Identifier;
608}
609
610export interface DeclareInterface extends Node {
611    type: "DeclareInterface";
612    id: Identifier;
613    typeParameters: TypeParameterDeclaration;
614    extends: InterfaceExtends[];
615    body: ObjectTypeAnnotation;
616}
617
618export interface DeclareModule extends Node {
619    type: "DeclareModule";
620    id: StringLiteral | Identifier;
621    body: BlockStatement;
622}
623
624export interface DeclareTypeAlias extends Node {
625    type: "DeclareTypeAlias";
626    id: Identifier;
627    typeParameters: TypeParameterDeclaration;
628    right: FlowTypeAnnotation;
629}
630
631export interface DeclareVariable extends Node {
632    type: "DeclareVariable";
633    id: Identifier;
634}
635
636export interface ExistentialTypeParam extends Node {
637    type: "ExistentialTypeParam";
638}
639
640export interface FunctionTypeAnnotation extends Node {
641    type: "FunctionTypeAnnotation";
642    typeParameters: TypeParameterDeclaration;
643    params: FunctionTypeParam[];
644    rest: FunctionTypeParam;
645    returnType: FlowTypeAnnotation;
646}
647
648export interface FunctionTypeParam extends Node {
649    type: "FunctionTypeParam";
650    name: Identifier;
651    typeAnnotation: FlowTypeAnnotation;
652}
653
654export interface GenericTypeAnnotation extends Node {
655    type: "GenericTypeAnnotation";
656    id: Identifier;
657    typeParameters: TypeParameterInstantiation;
658}
659
660export interface InterfaceExtends extends Node {
661    type: "InterfaceExtends";
662    id: Identifier;
663    typeParameters: TypeParameterInstantiation;
664}
665
666export interface InterfaceDeclaration extends Node {
667    type: "InterfaceDeclaration";
668    id: Identifier;
669    typeParameters: TypeParameterDeclaration;
670    extends: InterfaceExtends[];
671    mixins?: any[] | undefined;
672    body: ObjectTypeAnnotation;
673}
674
675export interface IntersectionTypeAnnotation extends Node {
676    type: "IntersectionTypeAnnotation";
677    types: FlowTypeAnnotation[];
678}
679
680export interface MixedTypeAnnotation extends Node {
681    type: "MixedTypeAnnotation";
682}
683
684export interface NullableTypeAnnotation extends Node {
685    type: "NullableTypeAnnotation";
686    typeAnnotation: FlowTypeAnnotation;
687}
688
689export interface NumericLiteralTypeAnnotation extends Node {
690    type: "NumericLiteralTypeAnnotation";
691}
692
693export interface NumberTypeAnnotation extends Node {
694    type: "NumberTypeAnnotation";
695}
696
697export interface StringLiteralTypeAnnotation extends Node {
698    type: "StringLiteralTypeAnnotation";
699}
700
701export interface StringTypeAnnotation extends Node {
702    type: "StringTypeAnnotation";
703}
704
705export interface ThisTypeAnnotation extends Node {
706    type: "ThisTypeAnnotation";
707}
708
709export interface TupleTypeAnnotation extends Node {
710    type: "TupleTypeAnnotation";
711    types: FlowTypeAnnotation[];
712}
713
714export interface TypeofTypeAnnotation extends Node {
715    type: "TypeofTypeAnnotation";
716    argument: FlowTypeAnnotation;
717}
718
719export interface TypeAlias extends Node {
720    type: "TypeAlias";
721    id: Identifier;
722    typeParameters: TypeParameterDeclaration;
723    right: FlowTypeAnnotation;
724}
725
726export interface TypeAnnotation extends Node {
727    type: "TypeAnnotation";
728    typeAnnotation: FlowTypeAnnotation;
729}
730
731export interface TypeCastExpression extends Node {
732    type: "TypeCastExpression";
733    expression: Expression;
734    typeAnnotation: FlowTypeAnnotation;
735}
736
737export interface TypeParameter extends Node {
738    type: "TypeParameterDeclaration";
739    bound: TypeAnnotation | null;
740    default: Flow | null;
741    name: string | null;
742}
743
744export interface TypeParameterDeclaration extends Node {
745    type: "TypeParameterDeclaration";
746    params: Identifier[];
747}
748
749export interface TypeParameterInstantiation extends Node {
750    type: "TypeParameterInstantiation";
751    params: FlowTypeAnnotation[];
752}
753
754export interface ObjectTypeAnnotation extends Node {
755    type: "ObjectTypeAnnotation";
756    properties: ObjectTypeProperty[];
757    indexers: ObjectTypeIndexer[];
758    callProperties: ObjectTypeCallProperty[];
759}
760
761export interface ObjectTypeCallProperty extends Node {
762    type: "ObjectTypeCallProperty";
763    value: FlowTypeAnnotation;
764}
765
766export interface ObjectTypeIndexer extends Node {
767    type: "ObjectTypeIndexer";
768    id: Expression;
769    key: FlowTypeAnnotation;
770    value: FlowTypeAnnotation;
771}
772
773export interface ObjectTypeProperty extends Node {
774    type: "ObjectTypeProperty";
775    key: Expression;
776    value: FlowTypeAnnotation;
777}
778
779export interface QualifiedTypeIdentifier extends Node {
780    type: "QualifiedTypeIdentifier";
781    id: Identifier;
782    qualification: Identifier | QualifiedTypeIdentifier;
783}
784
785export interface UnionTypeAnnotation extends Node {
786    type: "UnionTypeAnnotation";
787    types: FlowTypeAnnotation[];
788}
789
790export interface VoidTypeAnnotation extends Node {
791    type: "VoidTypeAnnotation";
792}
793
794export interface JSXAttribute extends Node {
795    type: "JSXAttribute";
796    name: JSXIdentifier | JSXNamespacedName;
797    value: JSXElement | StringLiteral | JSXExpressionContainer | null;
798}
799
800export interface JSXClosingElement extends Node {
801    type: "JSXClosingElement";
802    name: JSXIdentifier | JSXMemberExpression;
803}
804
805export interface JSXElement extends Node {
806    type: "JSXElement";
807    openingElement: JSXOpeningElement;
808    closingElement: JSXClosingElement;
809    children: Array<JSXElement | JSXExpressionContainer | JSXText>;
810    selfClosing?: boolean | undefined;
811}
812
813export interface JSXEmptyExpression extends Node {
814    type: "JSXEmptyExpression";
815}
816
817export interface JSXExpressionContainer extends Node {
818    type: "JSXExpressionContainer";
819    expression: Expression;
820}
821
822export interface JSXIdentifier extends Node {
823    type: "JSXIdentifier";
824    name: string;
825}
826
827export interface JSXMemberExpression extends Node {
828    type: "JSXMemberExpression";
829    object: JSXMemberExpression | JSXIdentifier;
830    property: JSXIdentifier;
831}
832
833export interface JSXNamespacedName extends Node {
834    type: "JSXNamespacedName";
835    namespace: JSXIdentifier;
836    name: JSXIdentifier;
837}
838
839export interface JSXOpeningElement extends Node {
840    type: "JSXOpeningElement";
841    name: JSXIdentifier | JSXMemberExpression;
842    selfClosing: boolean;
843    attributes: JSXAttribute[];
844}
845
846export interface JSXSpreadAttribute extends Node {
847    type: "JSXSpreadAttribute";
848    argument: Expression;
849}
850
851export interface JSXText extends Node {
852    type: "JSXText";
853    value: string;
854}
855
856export interface Noop extends Node {
857    type: "Noop";
858}
859
860export interface ParenthesizedExpression extends Node {
861    type: "ParenthesizedExpression";
862    expression: Expression;
863}
864
865export interface AwaitExpression extends Node {
866    type: "AwaitExpression";
867    argument: Expression;
868}
869
870export interface BindExpression extends Node {
871    type: "BindExpression";
872    object: Expression;
873    callee: Expression;
874}
875
876export interface Decorator extends Node {
877    type: "Decorator";
878    expression: Expression;
879}
880
881export interface DoExpression extends Node {
882    type: "DoExpression";
883    body: BlockStatement;
884}
885
886export interface ExportDefaultSpecifier extends Node {
887    type: "ExportDefaultSpecifier";
888    exported: Identifier;
889}
890
891export interface ExportNamespaceSpecifier extends Node {
892    type: "ExportNamespaceSpecifier";
893    exported: Identifier;
894}
895
896export interface RestProperty extends Node {
897    type: "RestProperty";
898    argument: LVal;
899}
900
901export interface SpreadProperty extends Node {
902    type: "SpreadProperty";
903    argument: Expression;
904}
905
906export interface TSAnyKeyword extends Node {
907    type: "TSAnyKeyword";
908}
909
910export interface TSArrayType extends Node {
911    type: "TSArrayType";
912    elementType: TSType;
913}
914
915export interface TSAsExpression extends Node {
916    type: "TSAsExpression";
917    expression: Expression;
918    typeAnnotation: TSType;
919}
920
921export interface TSBooleanKeyword extends Node {
922    type: "TSBooleanKeyword";
923}
924
925export interface TSCallSignatureDeclaration extends Node {
926    type: "TSCallSignatureDeclaration";
927    typeParameters: TypeParameterDeclaration | null;
928    parameters: Array<Identifier | RestElement> | null;
929    typeAnnotation: TSTypeAnnotation | null;
930}
931
932export interface TSConstructSignatureDeclaration extends Node {
933    type: "TSConstructSignatureDeclaration";
934    typeParameters: TypeParameterDeclaration | null;
935    parameters: Array<Identifier | RestElement> | null;
936    typeAnnotation: TSTypeAnnotation | null;
937}
938
939export interface TSConstructorType extends Node {
940    type: "TSConstructorType";
941    typeParameters: TypeParameterDeclaration | null;
942    typeAnnotation: TSTypeAnnotation | null;
943    parameters: Array<Identifier | RestElement> | null;
944}
945
946export interface TSDeclareFunction extends Node {
947    type: "TSDeclareFunction";
948    id: Identifier | null;
949    typeParameters: TypeParameterDeclaration | Noop | null;
950    params: LVal[];
951    returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
952    async: boolean;
953    declare: boolean | null;
954    generator: boolean;
955}
956
957export interface TSDeclareMethod extends Node {
958    type: "TSDeclareMethod";
959    decorators: Decorator[] | null;
960    key: Expression;
961    typeParameters: TypeParameterDeclaration | Noop | null;
962    params: LVal[];
963    returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
964    abstract: boolean | null;
965    access: "public" | "private" | "protected" | null;
966    accessibility: "public" | "private" | "protected" | null;
967    async: boolean;
968    computed: boolean;
969    generator: boolean;
970    kind: "get" | "set" | "method" | "constructor";
971    optional: boolean | null;
972    static: boolean | null;
973}
974
975export interface TSEnumDeclaration extends Node {
976    type: "TSEnumDeclaration";
977    id: Identifier;
978    members: TSEnumMember[];
979    const: boolean | null;
980    declare: boolean | null;
981    initializer: Expression | null;
982}
983
984export interface TSEnumMember extends Node {
985    type: "TSEnumMember";
986    id: Identifier | StringLiteral;
987    initializer: Expression | null;
988}
989
990export interface TSExportAssignment extends Node {
991    type: "TSExportAssignment";
992    expression: Expression;
993}
994
995export interface TSExpressionWithTypeArguments extends Node {
996    type: "TSExpressionWithTypeArguments";
997    expression: TSEntityName;
998    typeParameters: TypeParameterInstantiation | null;
999}
1000
1001export interface TSExternalModuleReference extends Node {
1002    type: "TSExternalModuleReference";
1003    expression: StringLiteral;
1004}
1005
1006export interface TSFunctionType extends Node {
1007    type: "TSFunctionType";
1008    typeParameters: TypeParameterDeclaration | null;
1009    typeAnnotation: TSTypeAnnotation | null;
1010    parameters: Array<Identifier | RestElement> | null;
1011}
1012
1013export interface TSImportEqualsDeclaration extends Node {
1014    type: "TSImportEqualsDeclaration";
1015    id: Identifier;
1016    moduleReference: TSEntityName | TSExternalModuleReference;
1017    isExport: boolean | null;
1018}
1019
1020export interface TSIndexSignature extends Node {
1021    type: "TSIndexSignature";
1022    parameters: Identifier[];
1023    typeAnnotation: TSTypeAnnotation | null;
1024    readonly: boolean | null;
1025}
1026
1027export interface TSIndexedAccessType extends Node {
1028    type: "TSIndexedAccessType";
1029    objectType: TSType;
1030    indexType: TSType;
1031}
1032
1033export interface TSInterfaceBody extends Node {
1034    type: "TSInterfaceBody";
1035    body: TSTypeElement[];
1036}
1037
1038export interface TSInterfaceDeclaration extends Node {
1039    type: "TSInterfaceDeclaration";
1040    id: Identifier;
1041    typeParameters: TypeParameterDeclaration | null;
1042    extends: TSExpressionWithTypeArguments[] | null;
1043    body: TSInterfaceBody;
1044    declare: boolean | null;
1045}
1046
1047export interface TSIntersectionType extends Node {
1048    type: "TSIntersectionType";
1049    types: TSType[];
1050}
1051
1052export interface TSLiteralType extends Node {
1053    type: "TSLiteralType";
1054    literal: NumericLiteral | StringLiteral | BooleanLiteral;
1055}
1056
1057export interface TSMappedType extends Node {
1058    type: "TSMappedType";
1059    typeParameter: TypeParameter;
1060    typeAnnotation: TSType | null;
1061    optional: boolean | null;
1062    readonly: boolean | null;
1063}
1064
1065export interface TSMethodSignature extends Node {
1066    type: "TSMethodSignature";
1067    key: Expression;
1068    typeParameters: TypeParameterDeclaration | null;
1069    parameters: Array<Identifier | RestElement> | null;
1070    typeAnnotation: TSTypeAnnotation | null;
1071    computed: boolean | null;
1072    optional: boolean | null;
1073}
1074
1075export interface TSModuleBlock extends Node {
1076    type: "TSModuleBlock";
1077    body: Statement[];
1078}
1079
1080export interface TSModuleDeclaration extends Node {
1081    type: "TSModuleDeclaration";
1082    id: Identifier | StringLiteral;
1083    body: TSModuleBlock | TSModuleDeclaration;
1084    declare: boolean | null;
1085    global: boolean | null;
1086}
1087
1088export interface TSNamespaceExportDeclaration extends Node {
1089    type: "TSNamespaceExportDeclaration";
1090    id: Identifier;
1091}
1092
1093export interface TSNeverKeyword extends Node {
1094    type: "TSNeverKeyword";
1095}
1096
1097export interface TSNonNullExpression extends Node {
1098    type: "TSNonNullExpression";
1099    expression: Expression;
1100}
1101
1102export interface TSNullKeyword extends Node {
1103    type: "TSNullKeyword";
1104}
1105
1106export interface TSNumberKeyword extends Node {
1107    type: "TSNumberKeyword";
1108}
1109
1110export interface TSObjectKeyword extends Node {
1111    type: "TSObjectKeyword";
1112}
1113
1114export interface TSParameterProperty extends Node {
1115    type: "TSParameterProperty";
1116    parameter: Identifier | AssignmentPattern;
1117    accessibility: "public" | "private" | "protected" | null;
1118    readonly: boolean | null;
1119}
1120
1121export interface TSParenthesizedType extends Node {
1122    type: "TSParenthesizedType";
1123    typeAnnotation: TSType;
1124}
1125
1126export interface TSPropertySignature extends Node {
1127    type: "TSPropertySignature";
1128    key: Expression;
1129    typeAnnotation: TSTypeAnnotation | null;
1130    initializer: Expression | null;
1131    computed: boolean | null;
1132    optional: boolean | null;
1133    readonly: boolean | null;
1134}
1135
1136export interface TSQualifiedName extends Node {
1137    type: "TSQualifiedName";
1138    left: TSEntityName;
1139    right: Identifier;
1140}
1141
1142export interface TSStringKeyword extends Node {
1143    type: "TSStringKeyword";
1144}
1145
1146export interface TSSymbolKeyword extends Node {
1147    type: "TSSymbolKeyword";
1148}
1149
1150export interface TSThisType extends Node {
1151    type: "TSThisType";
1152}
1153
1154export interface TSTupleType extends Node {
1155    type: "TSTupleType";
1156    elementTypes: TSType[];
1157}
1158
1159export interface TSTypeAliasDeclaration extends Node {
1160    type: "TSTypeAliasDeclaration";
1161    id: Identifier;
1162    typeParameters: TypeParameterDeclaration | null;
1163    typeAnnotation: TSType;
1164    declare: boolean | null;
1165}
1166
1167export interface TSTypeAnnotation extends Node {
1168    type: "TSTypeAnnotation";
1169    typeAnnotation: TSType;
1170}
1171
1172export interface TSTypeAssertion extends Node {
1173    type: "TSTypeAssertion";
1174    typeAnnotation: TSType;
1175    expression: Expression;
1176}
1177
1178export interface TSTypeLiteral extends Node {
1179    type: "TSTypeLiteral";
1180    members: TSTypeElement[];
1181}
1182
1183export interface TSTypeOperator extends Node {
1184    type: "TSTypeOperator";
1185    typeAnnotation: TSType;
1186    operator: string | null;
1187}
1188
1189export interface TSTypeParameter extends Node {
1190    type: "TSTypeParameter";
1191    constraint: TSType | null;
1192    default: TSType | null;
1193    name: string | null;
1194}
1195
1196export interface TSTypeParameterDeclaration extends Node {
1197    type: "TSTypeParameterDeclaration";
1198    params: TSTypeParameter[];
1199}
1200
1201export interface TSTypeParameterInstantiation extends Node {
1202    type: "TSTypeParameterInstantiation";
1203    params: TSType[];
1204}
1205
1206export interface TSTypePredicate extends Node {
1207    type: "TSTypePredicate";
1208    parameterName: Identifier | TSThisType;
1209    typeAnnotation: TSTypeAnnotation;
1210}
1211
1212export interface TSTypeQuery extends Node {
1213    type: "TSTypeQuery";
1214    exprName: TSEntityName;
1215}
1216
1217export interface TSTypeReference extends Node {
1218    type: "TSTypeReference";
1219    typeName: TSEntityName;
1220    typeParameters: TypeParameterInstantiation | null;
1221}
1222
1223export interface TSUndefinedKeyword extends Node {
1224    type: "TSUndefinedKeyword";
1225}
1226
1227export interface TSUnionType extends Node {
1228    type: "TSUnionType";
1229    types: TSType[];
1230}
1231
1232export interface TSVoidKeyword extends Node {
1233    type: "TSVoidKeyword";
1234}
1235
1236export type Expression =
1237    | ArrayExpression
1238    | AssignmentExpression
1239    | BinaryExpression
1240    | CallExpression
1241    | ConditionalExpression
1242    | FunctionExpression
1243    | Identifier
1244    | StringLiteral
1245    | NumericLiteral
1246    | BooleanLiteral
1247    | NullLiteral
1248    | RegExpLiteral
1249    | LogicalExpression
1250    | MemberExpression
1251    | NewExpression
1252    | ObjectExpression
1253    | SequenceExpression
1254    | ThisExpression
1255    | UnaryExpression
1256    | UpdateExpression
1257    | ArrowFunctionExpression
1258    | ClassExpression
1259    | MetaProperty
1260    | Super
1261    | TaggedTemplateExpression
1262    | TemplateLiteral
1263    | YieldExpression
1264    | TypeCastExpression
1265    | JSXElement
1266    | JSXEmptyExpression
1267    | JSXIdentifier
1268    | JSXMemberExpression
1269    | ParenthesizedExpression
1270    | AwaitExpression
1271    | BindExpression
1272    | DoExpression
1273    | TSAsExpression
1274    | TSNonNullExpression
1275    | TSTypeAssertion;
1276
1277export type Binary = BinaryExpression | LogicalExpression;
1278
1279export type Scopable =
1280    | BlockStatement
1281    | CatchClause
1282    | DoWhileStatement
1283    | ForInStatement
1284    | ForStatement
1285    | FunctionDeclaration
1286    | FunctionExpression
1287    | Program
1288    | ObjectMethod
1289    | SwitchStatement
1290    | WhileStatement
1291    | ArrowFunctionExpression
1292    | ClassDeclaration
1293    | ClassExpression
1294    | ForOfStatement
1295    | ClassMethod;
1296
1297export type BlockParent =
1298    | BlockStatement
1299    | DoWhileStatement
1300    | ForInStatement
1301    | ForStatement
1302    | FunctionDeclaration
1303    | FunctionExpression
1304    | Program
1305    | ObjectMethod
1306    | SwitchStatement
1307    | WhileStatement
1308    | ArrowFunctionExpression
1309    | ForOfStatement
1310    | ClassMethod;
1311
1312export type Block = BlockStatement | Program;
1313
1314export type Statement =
1315    | BlockStatement
1316    | BreakStatement
1317    | ContinueStatement
1318    | DebuggerStatement
1319    | DoWhileStatement
1320    | EmptyStatement
1321    | ExpressionStatement
1322    | ForInStatement
1323    | ForStatement
1324    | FunctionDeclaration
1325    | IfStatement
1326    | LabeledStatement
1327    | ReturnStatement
1328    | SwitchStatement
1329    | ThrowStatement
1330    | TryStatement
1331    | VariableDeclaration
1332    | WhileStatement
1333    | WithStatement
1334    | ClassDeclaration
1335    | ExportAllDeclaration
1336    | ExportDefaultDeclaration
1337    | ExportNamedDeclaration
1338    | ForOfStatement
1339    | ImportDeclaration
1340    | DeclareClass
1341    | DeclareFunction
1342    | DeclareInterface
1343    | DeclareModule
1344    | DeclareTypeAlias
1345    | DeclareVariable
1346    | InterfaceDeclaration
1347    | TypeAlias
1348    | TSDeclareFunction
1349    | TSEnumDeclaration
1350    | TSExportAssignment
1351    | TSImportEqualsDeclaration
1352    | TSInterfaceDeclaration
1353    | TSModuleDeclaration
1354    | TSNamespaceExportDeclaration
1355    | TSTypeAliasDeclaration;
1356
1357export type Terminatorless =
1358    | BreakStatement
1359    | ContinueStatement
1360    | ReturnStatement
1361    | ThrowStatement
1362    | YieldExpression
1363    | AwaitExpression;
1364export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement;
1365export type Conditional = ConditionalExpression | IfStatement;
1366export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement;
1367export type While = DoWhileStatement | WhileStatement;
1368export type ExpressionWrapper = ExpressionStatement | TypeCastExpression | ParenthesizedExpression;
1369export type For = ForInStatement | ForStatement | ForOfStatement;
1370export type ForXStatement = ForInStatement | ForOfStatement;
1371export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod;
1372export type FunctionParent =
1373    | FunctionDeclaration
1374    | FunctionExpression
1375    | Program
1376    | ObjectMethod
1377    | ArrowFunctionExpression
1378    | ClassMethod;
1379export type Pureish =
1380    | FunctionDeclaration
1381    | FunctionExpression
1382    | StringLiteral
1383    | NumericLiteral
1384    | BooleanLiteral
1385    | NullLiteral
1386    | ArrowFunctionExpression
1387    | ClassDeclaration
1388    | ClassExpression;
1389
1390export type Declaration =
1391    | FunctionDeclaration
1392    | VariableDeclaration
1393    | ClassDeclaration
1394    | ExportAllDeclaration
1395    | ExportDefaultDeclaration
1396    | ExportNamedDeclaration
1397    | ImportDeclaration
1398    | DeclareClass
1399    | DeclareFunction
1400    | DeclareInterface
1401    | DeclareModule
1402    | DeclareTypeAlias
1403    | DeclareVariable
1404    | InterfaceDeclaration
1405    | TypeAlias
1406    | TSDeclareFunction
1407    | TSEnumDeclaration
1408    | TSInterfaceDeclaration
1409    | TSModuleDeclaration
1410    | TSTypeAliasDeclaration;
1411
1412export type LVal =
1413    | Identifier
1414    | MemberExpression
1415    | RestElement
1416    | AssignmentPattern
1417    | ArrayPattern
1418    | ObjectPattern
1419    | TSParameterProperty;
1420export type Literal = StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | RegExpLiteral | TemplateLiteral;
1421export type Immutable =
1422    | StringLiteral
1423    | NumericLiteral
1424    | BooleanLiteral
1425    | NullLiteral
1426    | JSXAttribute
1427    | JSXClosingElement
1428    | JSXElement
1429    | JSXExpressionContainer
1430    | JSXOpeningElement;
1431export type UserWhitespacable =
1432    | ObjectMethod
1433    | ObjectProperty
1434    | ObjectTypeCallProperty
1435    | ObjectTypeIndexer
1436    | ObjectTypeProperty;
1437export type Method = ObjectMethod | ClassMethod;
1438export type ObjectMember = ObjectMethod | ObjectProperty;
1439export type Property = ObjectProperty | ClassProperty;
1440export type UnaryLike = UnaryExpression | SpreadElement | RestProperty | SpreadProperty;
1441export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
1442export type Class = ClassDeclaration | ClassExpression;
1443export type ModuleDeclaration =
1444    | ExportAllDeclaration
1445    | ExportDefaultDeclaration
1446    | ExportNamedDeclaration
1447    | ImportDeclaration;
1448export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
1449export type ModuleSpecifier =
1450    | ExportSpecifier
1451    | ImportDefaultSpecifier
1452    | ImportNamespaceSpecifier
1453    | ImportSpecifier
1454    | ExportDefaultSpecifier
1455    | ExportNamespaceSpecifier;
1456
1457export type Flow =
1458    | AnyTypeAnnotation
1459    | ArrayTypeAnnotation
1460    | BooleanTypeAnnotation
1461    | BooleanLiteralTypeAnnotation
1462    | ClassImplements
1463    | ClassProperty
1464    | DeclareClass
1465    | DeclareFunction
1466    | DeclareInterface
1467    | DeclareModule
1468    | DeclareTypeAlias
1469    | DeclareVariable
1470    | ExistentialTypeParam
1471    | FunctionTypeAnnotation
1472    | FunctionTypeParam
1473    | GenericTypeAnnotation
1474    | InterfaceExtends
1475    | InterfaceDeclaration
1476    | IntersectionTypeAnnotation
1477    | MixedTypeAnnotation
1478    | NullableTypeAnnotation
1479    | NumericLiteralTypeAnnotation
1480    | NumberTypeAnnotation
1481    | StringLiteralTypeAnnotation
1482    | StringTypeAnnotation
1483    | ThisTypeAnnotation
1484    | TupleTypeAnnotation
1485    | TypeofTypeAnnotation
1486    | TypeAlias
1487    | TypeAnnotation
1488    | TypeCastExpression
1489    | TypeParameterDeclaration
1490    | TypeParameterInstantiation
1491    | ObjectTypeAnnotation
1492    | ObjectTypeCallProperty
1493    | ObjectTypeIndexer
1494    | ObjectTypeProperty
1495    | QualifiedTypeIdentifier
1496    | UnionTypeAnnotation
1497    | VoidTypeAnnotation;
1498
1499export type FlowTypeAnnotation =
1500    | AnyTypeAnnotation
1501    | ArrayTypeAnnotation
1502    | BooleanTypeAnnotation
1503    | BooleanLiteralTypeAnnotation
1504    | FunctionTypeAnnotation
1505    | GenericTypeAnnotation
1506    | IntersectionTypeAnnotation
1507    | MixedTypeAnnotation
1508    | NullableTypeAnnotation
1509    | NumericLiteralTypeAnnotation
1510    | NumberTypeAnnotation
1511    | StringLiteralTypeAnnotation
1512    | StringTypeAnnotation
1513    | ThisTypeAnnotation
1514    | TupleTypeAnnotation
1515    | TypeofTypeAnnotation
1516    | TypeAnnotation
1517    | ObjectTypeAnnotation
1518    | UnionTypeAnnotation
1519    | VoidTypeAnnotation;
1520
1521export type FlowBaseAnnotation =
1522    | AnyTypeAnnotation
1523    | BooleanTypeAnnotation
1524    | MixedTypeAnnotation
1525    | NumberTypeAnnotation
1526    | StringTypeAnnotation
1527    | ThisTypeAnnotation
1528    | VoidTypeAnnotation;
1529export type FlowDeclaration =
1530    | DeclareClass
1531    | DeclareFunction
1532    | DeclareInterface
1533    | DeclareModule
1534    | DeclareTypeAlias
1535    | DeclareVariable
1536    | InterfaceDeclaration
1537    | TypeAlias;
1538
1539export type JSX =
1540    | JSXAttribute
1541    | JSXClosingElement
1542    | JSXElement
1543    | JSXEmptyExpression
1544    | JSXExpressionContainer
1545    | JSXIdentifier
1546    | JSXMemberExpression
1547    | JSXNamespacedName
1548    | JSXOpeningElement
1549    | JSXSpreadAttribute
1550    | JSXText;
1551
1552export type TSType =
1553    | TSAnyKeyword
1554    | TSArrayType
1555    | TSBooleanKeyword
1556    | TSConstructorType
1557    | TSExpressionWithTypeArguments
1558    | TSFunctionType
1559    | TSIndexedAccessType
1560    | TSIntersectionType
1561    | TSLiteralType
1562    | TSMappedType
1563    | TSNeverKeyword
1564    | TSNullKeyword
1565    | TSNumberKeyword
1566    | TSObjectKeyword
1567    | TSParenthesizedType
1568    | TSStringKeyword
1569    | TSSymbolKeyword
1570    | TSThisType
1571    | TSTupleType
1572    | TSTypeLiteral
1573    | TSTypeOperator
1574    | TSTypePredicate
1575    | TSTypeQuery
1576    | TSTypeReference
1577    | TSUndefinedKeyword
1578    | TSUnionType
1579    | TSVoidKeyword;
1580
1581export type TSEntityName = Identifier | TSQualifiedName;
1582
1583export type TSTypeElement =
1584    | TSCallSignatureDeclaration
1585    | TSConstructSignatureDeclaration
1586    | TSIndexSignature
1587    | TSMethodSignature
1588    | TSPropertySignature;
1589
1590export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
1591export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression;
1592export function binaryExpression(
1593    operator?:
1594        | "+"
1595        | "-"
1596        | "/"
1597        | "%"
1598        | "*"
1599        | "**"
1600        | "&"
1601        | "|"
1602        | ">>"
1603        | ">>>"
1604        | "<<"
1605        | "^"
1606        | "=="
1607        | "==="
1608        | "!="
1609        | "!=="
1610        | "in"
1611        | "instanceof"
1612        | ">"
1613        | "<"
1614        | ">="
1615        | "<=",
1616    left?: Expression,
1617    right?: Expression,
1618): BinaryExpression;
1619export function directive(value?: DirectiveLiteral): Directive;
1620export function directiveLiteral(value?: string): DirectiveLiteral;
1621export function blockStatement(body?: Statement[], directives?: Directive[]): BlockStatement;
1622export function breakStatement(label?: Identifier): BreakStatement;
1623export function callExpression(callee?: Expression, _arguments?: Array<Expression | SpreadElement>): CallExpression;
1624export function catchClause(param?: Identifier, body?: BlockStatement): CatchClause;
1625export function conditionalExpression(
1626    test?: Expression,
1627    consequent?: Expression,
1628    alternate?: Expression,
1629): ConditionalExpression;
1630export function continueStatement(label?: Identifier): ContinueStatement;
1631export function debuggerStatement(): DebuggerStatement;
1632export function doWhileStatement(test?: Expression, body?: Statement): DoWhileStatement;
1633export function emptyStatement(): EmptyStatement;
1634export function expressionStatement(expression?: Expression): ExpressionStatement;
1635export function file(program?: Program, comments?: Comment[], tokens?: any[]): File;
1636export function forInStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForInStatement;
1637export function forStatement(
1638    init?: VariableDeclaration | Expression,
1639    test?: Expression,
1640    update?: Expression,
1641    body?: Statement,
1642): ForStatement;
1643export function functionDeclaration(
1644    id?: Identifier,
1645    params?: LVal[],
1646    body?: BlockStatement,
1647    generator?: boolean,
1648    async?: boolean,
1649): FunctionDeclaration;
1650export function functionExpression(
1651    id?: Identifier,
1652    params?: LVal[],
1653    body?: BlockStatement,
1654    generator?: boolean,
1655    async?: boolean,
1656): FunctionExpression;
1657export function identifier(name?: string): Identifier;
1658export function ifStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement;
1659export function labeledStatement(label?: Identifier, body?: Statement): LabeledStatement;
1660export function stringLiteral(value?: string): StringLiteral;
1661export function numericLiteral(value?: number): NumericLiteral;
1662export function nullLiteral(): NullLiteral;
1663export function booleanLiteral(value?: boolean): BooleanLiteral;
1664export function regExpLiteral(pattern?: string, flags?: string): RegExpLiteral;
1665export function logicalExpression(operator?: "||" | "&&", left?: Expression, right?: Expression): LogicalExpression;
1666export function memberExpression(
1667    object?: Expression | Super,
1668    property?: Expression,
1669    computed?: boolean,
1670): MemberExpression;
1671export function newExpression(
1672    callee?: Expression | Super,
1673    _arguments?: Array<Expression | SpreadElement>,
1674): NewExpression;
1675export function program(body?: Array<Statement | ModuleDeclaration>, directives?: Directive[]): Program;
1676export function objectExpression(properties?: Array<ObjectProperty | ObjectMethod | SpreadProperty>): ObjectExpression;
1677export function objectMethod(
1678    kind?: "get" | "set" | "method",
1679    key?: Expression,
1680    params?: LVal[],
1681    body?: BlockStatement,
1682    computed?: boolean,
1683): ObjectMethod;
1684export function objectProperty(
1685    key?: Expression,
1686    value?: Expression,
1687    computed?: boolean,
1688    shorthand?: boolean,
1689    decorators?: Decorator[],
1690): ObjectProperty;
1691export function restElement(argument?: LVal, typeAnnotation?: TypeAnnotation): RestElement;
1692export function returnStatement(argument?: Expression): ReturnStatement;
1693export function sequenceExpression(expressions?: Expression[]): SequenceExpression;
1694export function switchCase(test?: Expression, consequent?: Statement[]): SwitchCase;
1695export function switchStatement(discriminant?: Expression, cases?: SwitchCase[]): SwitchStatement;
1696export function thisExpression(): ThisExpression;
1697export function throwStatement(argument?: Expression): ThrowStatement;
1698export function tryStatement(block?: BlockStatement, handler?: CatchClause, finalizer?: BlockStatement): TryStatement;
1699export function unaryExpression(
1700    operator?: "void" | "delete" | "!" | "+" | "-" | "++" | "--" | "~" | "typeof",
1701    argument?: Expression,
1702    prefix?: boolean,
1703): UnaryExpression;
1704export function updateExpression(operator?: "++" | "--", argument?: Expression, prefix?: boolean): UpdateExpression;
1705export function variableDeclaration(
1706    kind?: "var" | "let" | "const",
1707    declarations?: VariableDeclarator[],
1708): VariableDeclaration;
1709export function variableDeclarator(id?: LVal, init?: Expression): VariableDeclarator;
1710export function whileStatement(test?: Expression, body?: BlockStatement | Statement): WhileStatement;
1711export function withStatement(object?: Expression, body?: BlockStatement | Statement): WithStatement;
1712export function assignmentPattern(left?: Identifier, right?: Expression): AssignmentPattern;
1713export function arrayPattern(elements?: Expression[], typeAnnotation?: TypeAnnotation): ArrayPattern;
1714export function arrowFunctionExpression(
1715    params?: LVal[],
1716    body?: BlockStatement | Expression,
1717    async?: boolean,
1718): ArrowFunctionExpression;
1719export function classBody(body?: Array<ClassMethod | ClassProperty>): ClassBody;
1720export function classDeclaration(
1721    id?: Identifier,
1722    superClass?: Expression,
1723    body?: ClassBody,
1724    decorators?: Decorator[],
1725): ClassDeclaration;
1726export function classExpression(
1727    id?: Identifier,
1728    superClass?: Expression,
1729    body?: ClassBody,
1730    decorators?: Decorator[],
1731): ClassExpression;
1732export function exportAllDeclaration(source?: StringLiteral): ExportAllDeclaration;
1733export function exportDefaultDeclaration(
1734    declaration?: FunctionDeclaration | ClassDeclaration | Expression,
1735): ExportDefaultDeclaration;
1736export function exportNamedDeclaration(
1737    declaration?: Declaration,
1738    specifiers?: ExportSpecifier[],
1739    source?: StringLiteral,
1740): ExportNamedDeclaration;
1741export function exportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier;
1742export function forOfStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForOfStatement;
1743export function importDeclaration(
1744    specifiers?: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>,
1745    source?: StringLiteral,
1746): ImportDeclaration;
1747export function importDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier;
1748export function importNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier;
1749export function importSpecifier(local?: Identifier, imported?: Identifier): ImportSpecifier;
1750export function metaProperty(meta?: string, property?: string): MetaProperty;
1751export function classMethod(
1752    kind?: "constructor" | "method" | "get" | "set",
1753    key?: Expression,
1754    params?: LVal[],
1755    body?: BlockStatement,
1756    computed?: boolean,
1757    _static?: boolean,
1758): ClassMethod;
1759export function objectPattern(
1760    properties?: Array<AssignmentProperty | RestProperty>,
1761    typeAnnotation?: TypeAnnotation,
1762): ObjectPattern;
1763export function spreadElement(argument?: Expression): SpreadElement;
1764export function taggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral): TaggedTemplateExpression;
1765export function templateElement(
1766    value?: { cooked?: string | undefined; raw?: string | undefined },
1767    tail?: boolean,
1768): TemplateElement;
1769export function templateLiteral(quasis?: TemplateElement[], expressions?: Expression[]): TemplateLiteral;
1770export function yieldExpression(argument?: Expression, delegate?: boolean): YieldExpression;
1771export function anyTypeAnnotation(): AnyTypeAnnotation;
1772export function arrayTypeAnnotation(elementType?: FlowTypeAnnotation): ArrayTypeAnnotation;
1773export function booleanTypeAnnotation(): BooleanTypeAnnotation;
1774export function booleanLiteralTypeAnnotation(): BooleanLiteralTypeAnnotation;
1775export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation;
1776export function classImplements(id?: Identifier, typeParameters?: TypeParameterInstantiation): ClassImplements;
1777export function classProperty(
1778    key?: Identifier,
1779    value?: Expression,
1780    typeAnnotation?: TypeAnnotation,
1781    decorators?: Decorator[],
1782): ClassProperty;
1783export function declareClass(
1784    id?: Identifier,
1785    typeParameters?: TypeParameterDeclaration,
1786    _extends?: InterfaceExtends[],
1787    body?: ObjectTypeAnnotation,
1788): DeclareClass;
1789export function declareFunction(id?: Identifier): DeclareFunction;
1790export function declareInterface(
1791    id?: Identifier,
1792    typeParameters?: TypeParameterDeclaration,
1793    _extends?: InterfaceExtends[],
1794    body?: ObjectTypeAnnotation,
1795): DeclareInterface;
1796export function declareModule(id?: StringLiteral | Identifier, body?: BlockStatement): DeclareModule;
1797export function declareTypeAlias(
1798    id?: Identifier,
1799    typeParameters?: TypeParameterDeclaration,
1800    right?: FlowTypeAnnotation,
1801): DeclareTypeAlias;
1802export function declareVariable(id?: Identifier): DeclareVariable;
1803export function existentialTypeParam(): ExistentialTypeParam;
1804export function functionTypeAnnotation(
1805    typeParameters?: TypeParameterDeclaration,
1806    params?: FunctionTypeParam[],
1807    rest?: FunctionTypeParam,
1808    returnType?: FlowTypeAnnotation,
1809): FunctionTypeAnnotation;
1810export function functionTypeParam(name?: Identifier, typeAnnotation?: FlowTypeAnnotation): FunctionTypeParam;
1811export function genericTypeAnnotation(
1812    id?: Identifier,
1813    typeParameters?: TypeParameterInstantiation,
1814): GenericTypeAnnotation;
1815export function interfaceExtends(id?: Identifier, typeParameters?: TypeParameterInstantiation): InterfaceExtends;
1816export function interfaceDeclaration(
1817    id?: Identifier,
1818    typeParameters?: TypeParameterDeclaration,
1819    _extends?: InterfaceExtends[],
1820    body?: ObjectTypeAnnotation,
1821): InterfaceDeclaration;
1822export function intersectionTypeAnnotation(types?: FlowTypeAnnotation[]): IntersectionTypeAnnotation;
1823export function mixedTypeAnnotation(): MixedTypeAnnotation;
1824export function nullableTypeAnnotation(typeAnnotation?: FlowTypeAnnotation): NullableTypeAnnotation;
1825export function numericLiteralTypeAnnotation(): NumericLiteralTypeAnnotation;
1826export function numberTypeAnnotation(): NumberTypeAnnotation;
1827export function stringLiteralTypeAnnotation(): StringLiteralTypeAnnotation;
1828export function stringTypeAnnotation(): StringTypeAnnotation;
1829export function thisTypeAnnotation(): ThisTypeAnnotation;
1830export function tupleTypeAnnotation(types?: FlowTypeAnnotation[]): TupleTypeAnnotation;
1831export function typeofTypeAnnotation(argument?: FlowTypeAnnotation): TypeofTypeAnnotation;
1832export function typeAlias(
1833    id?: Identifier,
1834    typeParameters?: TypeParameterDeclaration,
1835    right?: FlowTypeAnnotation,
1836): TypeAlias;
1837export function typeAnnotation(typeAnnotation?: FlowTypeAnnotation): TypeAnnotation;
1838export function typeCastExpression(expression?: Expression, typeAnnotation?: FlowTypeAnnotation): TypeCastExpression;
1839export function typeParameter(bound?: TypeAnnotation, default_?: Flow): TypeParameter;
1840export function typeParameterDeclaration(params?: Identifier[]): TypeParameterDeclaration;
1841export function typeParameterInstantiation(params?: FlowTypeAnnotation[]): TypeParameterInstantiation;
1842export function objectTypeAnnotation(
1843    properties?: ObjectTypeProperty[],
1844    indexers?: ObjectTypeIndexer[],
1845    callProperties?: ObjectTypeCallProperty[],
1846): ObjectTypeAnnotation;
1847export function objectTypeCallProperty(value?: FlowTypeAnnotation): ObjectTypeCallProperty;
1848export function objectTypeIndexer(
1849    id?: Expression,
1850    key?: FlowTypeAnnotation,
1851    value?: FlowTypeAnnotation,
1852): ObjectTypeIndexer;
1853export function objectTypeProperty(key?: Expression, value?: FlowTypeAnnotation): ObjectTypeProperty;
1854export function qualifiedTypeIdentifier(
1855    id?: Identifier,
1856    qualification?: Identifier | QualifiedTypeIdentifier,
1857): QualifiedTypeIdentifier;
1858export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnnotation;
1859export function voidTypeAnnotation(): VoidTypeAnnotation;
1860export function jSXAttribute(
1861    name?: JSXIdentifier | JSXNamespacedName,
1862    value?: JSXElement | StringLiteral | JSXExpressionContainer | null,
1863): JSXAttribute;
1864export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
1865export function jSXElement(
1866    openingElement?: JSXOpeningElement,
1867    closingElement?: JSXClosingElement,
1868    children?: Array<JSXElement | JSXExpressionContainer | JSXText>,
1869    selfClosing?: boolean,
1870): JSXElement;
1871export function jSXEmptyExpression(): JSXEmptyExpression;
1872export function jSXExpressionContainer(expression?: Expression): JSXExpressionContainer;
1873export function jSXIdentifier(name?: string): JSXIdentifier;
1874export function jSXMemberExpression(
1875    object?: JSXMemberExpression | JSXIdentifier,
1876    property?: JSXIdentifier,
1877): JSXMemberExpression;
1878export function jSXNamespacedName(namespace?: JSXIdentifier, name?: JSXIdentifier): JSXNamespacedName;
1879export function jSXOpeningElement(
1880    name?: JSXIdentifier | JSXMemberExpression,
1881    attributes?: JSXAttribute[],
1882    selfClosing?: boolean,
1883): JSXOpeningElement;
1884export function jSXSpreadAttribute(argument?: Expression): JSXSpreadAttribute;
1885export function jSXText(value?: string): JSXText;
1886export function noop(): Noop;
1887export function parenthesizedExpression(expression?: Expression): ParenthesizedExpression;
1888export function awaitExpression(argument?: Expression): AwaitExpression;
1889export function bindExpression(object?: Expression, callee?: Expression): BindExpression;
1890export function decorator(expression?: Expression): Decorator;
1891export function doExpression(body?: BlockStatement): DoExpression;
1892export function exportDefaultSpecifier(exported?: Identifier): ExportDefaultSpecifier;
1893export function exportNamespaceSpecifier(exported?: Identifier): ExportNamespaceSpecifier;
1894export function restProperty(argument?: LVal): RestProperty;
1895export function spreadProperty(argument?: Expression): SpreadProperty;
1896
1897export function TSAnyKeyword(): TSAnyKeyword;
1898export function TSArrayType(elementType: TSType): TSArrayType;
1899export function TSAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
1900export function TSBooleanKeyword(): TSBooleanKeyword;
1901export function TSCallSignatureDeclaration(
1902    typeParameters?: TypeParameterDeclaration,
1903    parameters?: Array<Identifier | RestElement>,
1904    typeAnnotation?: TSTypeAnnotation,
1905): TSCallSignatureDeclaration;
1906export function TSConstructSignatureDeclaration(
1907    typeParameters?: TypeParameterDeclaration,
1908    parameters?: Array<Identifier | RestElement>,
1909    typeAnnotation?: TSTypeAnnotation,
1910): TSTypeElement;
1911export function TSConstructorType(
1912    typeParameters?: TypeParameterDeclaration,
1913    typeAnnotation?: TSTypeAnnotation,
1914): TSConstructorType;
1915export function TSDeclareFunction(
1916    id: Identifier | undefined | null,
1917    typeParameters: TypeParameterDeclaration | Noop | undefined | null,
1918    params: LVal[],
1919    returnType: TypeAnnotation | TSTypeAnnotation | Noop | undefined | null,
1920): TSDeclareFunction;
1921export function TSDeclareMethod(
1922    decorators: Decorator[] | undefined | null,
1923    key: Expression,
1924    typeParameters: TypeParameterDeclaration | Noop | undefined | null,
1925    params: LVal[],
1926    returnType?: TypeAnnotation | TSTypeAnnotation | Noop,
1927): TSDeclareMethod;
1928export function TSEnumDeclaration(id: Identifier, members: TSEnumMember[]): TSEnumDeclaration;
1929export function TSEnumMember(id: Identifier | StringLiteral, initializer?: Expression): TSEnumMember;
1930export function TSExportAssignment(expression: Expression): TSExportAssignment;
1931export function TSExpressionWithTypeArguments(
1932    expression: TSEntityName,
1933    typeParameters?: TypeParameterInstantiation,
1934): TSExpressionWithTypeArguments;
1935export function TSExternalModuleReference(expression: StringLiteral): TSExternalModuleReference;
1936export function TSFunctionType(
1937    typeParameters?: TypeParameterDeclaration,
1938    typeAnnotation?: TSTypeAnnotation,
1939): TSFunctionType;
1940export function TSImportEqualsDeclaration(
1941    id: Identifier,
1942    moduleReference: TSEntityName | TSExternalModuleReference,
1943): TSImportEqualsDeclaration;
1944export function TSIndexSignature(parameters: Identifier[], typeAnnotation?: TSTypeAnnotation): TSIndexSignature;
1945export function TSIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
1946export function TSInterfaceBody(body: TSTypeElement[]): TSInterfaceBody;
1947export function TSInterfaceDeclaration(
1948    id: Identifier,
1949    typeParameters: TypeParameterDeclaration | undefined | null,
1950    extends_: TSExpressionWithTypeArguments[] | undefined | null,
1951    body: TSInterfaceBody,
1952): TSInterfaceDeclaration;
1953export function TSIntersectionType(types: TSType[]): TSIntersectionType;
1954export function TSLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType;
1955export function TSMappedType(typeParameter: TypeParameter, typeAnnotation?: TSType): TSMappedType;
1956export function TSMethodSignature(
1957    key: Expression,
1958    typeParameters?: TypeParameterDeclaration,
1959    parameters?: Array<Identifier | RestElement>,
1960    typeAnnotation?: TSTypeAnnotation,
1961): TSMethodSignature;
1962export function TSModuleBlock(body: Statement[]): TSModuleBlock;
1963export function TSModuleDeclaration(
1964    id: Identifier | StringLiteral,
1965    body: TSModuleBlock | TSModuleDeclaration,
1966): TSModuleDeclaration;
1967export function TSNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration;
1968export function TSNeverKeyword(): TSNeverKeyword;
1969export function TSNonNullExpression(expression: Expression): TSNonNullExpression;
1970export function TSNullKeyword(): TSNullKeyword;
1971export function TSNumberKeyword(): TSNumberKeyword;
1972export function TSObjectKeyword(): TSObjectKeyword;
1973export function TSParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
1974export function TSParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
1975export function TSPropertySignature(
1976    key: Expression,
1977    typeAnnotation?: TSTypeAnnotation,
1978    initializer?: Expression,
1979): TSPropertySignature;
1980export function TSQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
1981export function TSStringKeyword(): TSStringKeyword;
1982export function TSSymbolKeyword(): TSSymbolKeyword;
1983export function TSThisType(): TSThisType;
1984export function TSTupleType(elementTypes: TSType[]): TSTupleType;
1985export function TSTypeAliasDeclaration(
1986    id: Identifier,
1987    typeParameters: TypeParameterDeclaration | undefined | null,
1988    typeAnnotation: TSType,
1989): TSTypeAliasDeclaration;
1990export function TSTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
1991export function TSTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
1992export function TSTypeLiteral(members: TSTypeElement[]): TSTypeLiteral;
1993export function TSTypeOperator(typeAnnotation: TSType): TSTypeOperator;
1994export function TSTypeParameter(constraint?: TSType, default_?: TSType): TSTypeParameter;
1995export function TSTypeParameterDeclaration(params: TSTypeParameter[]): TSTypeParameterDeclaration;
1996export function TSTypeParameterInstantiation(params: TSType[]): TSTypeParameterInstantiation;
1997export function TSTypePredicate(
1998    parameterName: Identifier | TSThisType,
1999    typeAnnotation: TSTypeAnnotation,
2000): TSTypePredicate;
2001export function TSTypeQuery(exprName: TSEntityName): TSTypeQuery;
2002export function TSTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation): TSTypeReference;
2003export function TSUndefinedKeyword(): TSUndefinedKeyword;
2004export function TSUnionType(types: TSType[]): TSUnionType;
2005export function TSVoidKeyword(): TSVoidKeyword;
2006
2007export function isArrayExpression(node: object | null | undefined, opts?: object): node is ArrayExpression;
2008export function isAssignmentExpression(node: object | null | undefined, opts?: object): node is AssignmentExpression;
2009export function isBinaryExpression(node: object | null | undefined, opts?: object): node is BinaryExpression;
2010export function isDirective(node: object | null | undefined, opts?: object): node is Directive;
2011export function isDirectiveLiteral(node: object | null | undefined, opts?: object): node is DirectiveLiteral;
2012export function isBlockStatement(node: object | null | undefined, opts?: object): node is BlockStatement;
2013export function isBreakStatement(node: object | null | undefined, opts?: object): node is BreakStatement;
2014export function isCallExpression(node: object | null | undefined, opts?: object): node is CallExpression;
2015export function isCatchClause(node: object | null | undefined, opts?: object): node is CatchClause;
2016export function isConditionalExpression(node: object | null | undefined, opts?: object): node is ConditionalExpression;
2017export function isContinueStatement(node: object | null | undefined, opts?: object): node is ContinueStatement;
2018export function isDebuggerStatement(node: object | null | undefined, opts?: object): node is DebuggerStatement;
2019export function isDoWhileStatement(node: object | null | undefined, opts?: object): node is DoWhileStatement;
2020export function isEmptyStatement(node: object | null | undefined, opts?: object): node is EmptyStatement;
2021export function isExpressionStatement(node: object | null | undefined, opts?: object): node is ExpressionStatement;
2022export function isFile(node: object | null | undefined, opts?: object): node is File;
2023export function isForInStatement(node: object | null | undefined, opts?: object): node is ForInStatement;
2024export function isForStatement(node: object | null | undefined, opts?: object): node is ForStatement;
2025export function isFunctionDeclaration(node: object | null | undefined, opts?: object): node is FunctionDeclaration;
2026export function isFunctionExpression(node: object | null | undefined, opts?: object): node is FunctionExpression;
2027export function isIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
2028export function isIfStatement(node: object | null | undefined, opts?: object): node is IfStatement;
2029export function isLabeledStatement(node: object | null | undefined, opts?: object): node is LabeledStatement;
2030export function isStringLiteral(node: object | null | undefined, opts?: object): node is StringLiteral;
2031export function isNumericLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
2032
2033/** @deprecated Use `isNumericLiteral` */
2034export function isNumberLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
2035export function isNullLiteral(node: object | null | undefined, opts?: object): node is NullLiteral;
2036export function isBooleanLiteral(node: object | null | undefined, opts?: object): node is BooleanLiteral;
2037export function isRegExpLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
2038
2039/** @deprecated Use `isRegExpLiteral` */
2040export function isRegexLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
2041export function isLogicalExpression(node: object | null | undefined, opts?: object): node is LogicalExpression;
2042export function isMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
2043export function isNewExpression(node: object | null | undefined, opts?: object): node is NewExpression;
2044export function isProgram(node: object | null | undefined, opts?: object): node is Program;
2045export function isObjectExpression(node: object | null | undefined, opts?: object): node is ObjectExpression;
2046export function isObjectMethod(node: object | null | undefined, opts?: object): node is ObjectMethod;
2047export function isObjectProperty(node: object | null | undefined, opts?: object): node is ObjectProperty;
2048export function isRestElement(node: object | null | undefined, opts?: object): node is RestElement;
2049export function isReturnStatement(node: object | null | undefined, opts?: object): node is ReturnStatement;
2050export function isSequenceExpression(node: object | null | undefined, opts?: object): node is SequenceExpression;
2051export function isSwitchCase(node: object | null | undefined, opts?: object): node is SwitchCase;
2052export function isSwitchStatement(node: object | null | undefined, opts?: object): node is SwitchStatement;
2053export function isThisExpression(node: object | null | undefined, opts?: object): node is ThisExpression;
2054export function isThrowStatement(node: object | null | undefined, opts?: object): node is ThrowStatement;
2055export function isTryStatement(node: object | null | undefined, opts?: object): node is TryStatement;
2056export function isUnaryExpression(node: object | null | undefined, opts?: object): node is UnaryExpression;
2057export function isUpdateExpression(node: object | null | undefined, opts?: object): node is UpdateExpression;
2058export function isVariableDeclaration(node: object | null | undefined, opts?: object): node is VariableDeclaration;
2059export function isVariableDeclarator(node: object | null | undefined, opts?: object): node is VariableDeclarator;
2060export function isWhileStatement(node: object | null | undefined, opts?: object): node is WhileStatement;
2061export function isWithStatement(node: object | null | undefined, opts?: object): node is WithStatement;
2062export function isAssignmentPattern(node: object | null | undefined, opts?: object): node is AssignmentPattern;
2063export function isArrayPattern(node: object | null | undefined, opts?: object): node is ArrayPattern;
2064export function isArrowFunctionExpression(
2065    node: object | null | undefined,
2066    opts?: object,
2067): node is ArrowFunctionExpression;
2068export function isClassBody(node: object | null | undefined, opts?: object): node is ClassBody;
2069export function isClassDeclaration(node: object | null | undefined, opts?: object): node is ClassDeclaration;
2070export function isClassExpression(node: object | null | undefined, opts?: object): node is ClassExpression;
2071export function isExportAllDeclaration(node: object | null | undefined, opts?: object): node is ExportAllDeclaration;
2072export function isExportDefaultDeclaration(
2073    node: object | null | undefined,
2074    opts?: object,
2075): node is ExportDefaultDeclaration;
2076export function isExportNamedDeclaration(
2077    node: object | null | undefined,
2078    opts?: object,
2079): node is ExportNamedDeclaration;
2080export function isExportSpecifier(node: object | null | undefined, opts?: object): node is ExportSpecifier;
2081export function isForOfStatement(node: object | null | undefined, opts?: object): node is ForOfStatement;
2082export function isImportDeclaration(node: object | null | undefined, opts?: object): node is ImportDeclaration;
2083export function isImportDefaultSpecifier(
2084    node: object | null | undefined,
2085    opts?: object,
2086): node is ImportDefaultSpecifier;
2087export function isImportNamespaceSpecifier(
2088    node: object | null | undefined,
2089    opts?: object,
2090): node is ImportNamespaceSpecifier;
2091export function isImportSpecifier(node: object | null | undefined, opts?: object): node is ImportSpecifier;
2092export function isMetaProperty(node: object | null | undefined, opts?: object): node is MetaProperty;
2093export function isClassMethod(node: object | null | undefined, opts?: object): node is ClassMethod;
2094export function isObjectPattern(node: object | null | undefined, opts?: object): node is ObjectPattern;
2095export function isSpreadElement(node: object | null | undefined, opts?: object): node is SpreadElement;
2096export function isSuper(node: object | null | undefined, opts?: object): node is Super;
2097export function isTaggedTemplateExpression(
2098    node: object | null | undefined,
2099    opts?: object,
2100): node is TaggedTemplateExpression;
2101export function isTemplateElement(node: object | null | undefined, opts?: object): node is TemplateElement;
2102export function isTemplateLiteral(node: object | null | undefined, opts?: object): node is TemplateLiteral;
2103export function isYieldExpression(node: object | null | undefined, opts?: object): node is YieldExpression;
2104export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object): node is AnyTypeAnnotation;
2105export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object): node is ArrayTypeAnnotation;
2106export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanTypeAnnotation;
2107export function isBooleanLiteralTypeAnnotation(
2108    node: object | null | undefined,
2109    opts?: object,
2110): node is BooleanLiteralTypeAnnotation;
2111export function isNullLiteralTypeAnnotation(
2112    node: object | null | undefined,
2113    opts?: object,
2114): node is NullLiteralTypeAnnotation;
2115export function isClassImplements(node: object | null | undefined, opts?: object): node is ClassImplements;
2116export function isClassProperty(node: object | null | undefined, opts?: object): node is ClassProperty;
2117export function isDeclareClass(node: object | null | undefined, opts?: object): node is DeclareClass;
2118export function isDeclareFunction(node: object | null | undefined, opts?: object): node is DeclareFunction;
2119export function isDeclareInterface(node: object | null | undefined, opts?: object): node is DeclareInterface;
2120export function isDeclareModule(node: object | null | undefined, opts?: object): node is DeclareModule;
2121export function isDeclareTypeAlias(node: object | null | undefined, opts?: object): node is DeclareTypeAlias;
2122export function isDeclareVariable(node: object | null | undefined, opts?: object): node is DeclareVariable;
2123export function isExistentialTypeParam(node: object | null | undefined, opts?: object): node is ExistentialTypeParam;
2124export function isFunctionTypeAnnotation(
2125    node: object | null | undefined,
2126    opts?: object,
2127): node is FunctionTypeAnnotation;
2128export function isFunctionTypeParam(node: object | null | undefined, opts?: object): node is FunctionTypeParam;
2129export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object): node is GenericTypeAnnotation;
2130export function isInterfaceExtends(node: object | null | undefined, opts?: object): node is InterfaceExtends;
2131export function isInterfaceDeclaration(node: object | null | undefined, opts?: object): node is InterfaceDeclaration;
2132export function isIntersectionTypeAnnotation(
2133    node: object | null | undefined,
2134    opts?: object,
2135): node is IntersectionTypeAnnotation;
2136export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object): node is MixedTypeAnnotation;
2137export function isNullableTypeAnnotation(
2138    node: object | null | undefined,
2139    opts?: object,
2140): node is NullableTypeAnnotation;
2141export function isNumericLiteralTypeAnnotation(
2142    node: object | null | undefined,
2143    opts?: object,
2144): node is NumericLiteralTypeAnnotation;
2145export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object): node is NumberTypeAnnotation;
2146export function isStringLiteralTypeAnnotation(
2147    node: object | null | undefined,
2148    opts?: object,
2149): node is StringLiteralTypeAnnotation;
2150export function isStringTypeAnnotation(node: object | null | undefined, opts?: object): node is StringTypeAnnotation;
2151export function isThisTypeAnnotation(node: object | null | undefined, opts?: object): node is ThisTypeAnnotation;
2152export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object): node is TupleTypeAnnotation;
2153export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeofTypeAnnotation;
2154export function isTypeAlias(node: object | null | undefined, opts?: object): node is TypeAlias;
2155export function isTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeAnnotation;
2156export function isTypeCastExpression(node: object | null | undefined, opts?: object): node is TypeCastExpression;
2157export function isTypeParameter(node: object | null | undefined, opts?: object): node is TypeParameter;
2158export function isTypeParameterDeclaration(
2159    node: object | null | undefined,
2160    opts?: object,
2161): node is TypeParameterDeclaration;
2162export function isTypeParameterInstantiation(
2163    node: object | null | undefined,
2164    opts?: object,
2165): node is TypeParameterInstantiation;
2166export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object): node is ObjectTypeAnnotation;
2167export function isObjectTypeCallProperty(
2168    node: object | null | undefined,
2169    opts?: object,
2170): node is ObjectTypeCallProperty;
2171export function isObjectTypeIndexer(node: object | null | undefined, opts?: object): node is ObjectTypeIndexer;
2172export function isObjectTypeProperty(node: object | null | undefined, opts?: object): node is ObjectTypeProperty;
2173export function isQualifiedTypeIdentifier(
2174    node: object | null | undefined,
2175    opts?: object,
2176): node is QualifiedTypeIdentifier;
2177export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object): node is UnionTypeAnnotation;
2178export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object): node is VoidTypeAnnotation;
2179export function isJSXAttribute(node: object | null | undefined, opts?: object): node is JSXAttribute;
2180export function isJSXClosingElement(node: object | null | undefined, opts?: object): node is JSXClosingElement;
2181export function isJSXElement(node: object | null | undefined, opts?: object): node is JSXElement;
2182export function isJSXEmptyExpression(node: object | null | undefined, opts?: object): node is JSXEmptyExpression;
2183export function isJSXExpressionContainer(
2184    node: object | null | undefined,
2185    opts?: object,
2186): node is JSXExpressionContainer;
2187export function isJSXIdentifier(node: object | null | undefined, opts?: object): node is JSXIdentifier;
2188export function isJSXMemberExpression(node: object | null | undefined, opts?: object): node is JSXMemberExpression;
2189export function isJSXNamespacedName(node: object | null | undefined, opts?: object): node is JSXNamespacedName;
2190export function isJSXOpeningElement(node: object | null | undefined, opts?: object): node is JSXOpeningElement;
2191export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object): node is JSXSpreadAttribute;
2192export function isJSXText(node: object | null | undefined, opts?: object): node is JSXText;
2193export function isNoop(node: object | null | undefined, opts?: object): node is Noop;
2194export function isParenthesizedExpression(
2195    node: object | null | undefined,
2196    opts?: object,
2197): node is ParenthesizedExpression;
2198export function isAwaitExpression(node: object | null | undefined, opts?: object): node is AwaitExpression;
2199export function isBindExpression(node: object | null | undefined, opts?: object): node is BindExpression;
2200export function isDecorator(node: object | null | undefined, opts?: object): node is Decorator;
2201export function isDoExpression(node: object | null | undefined, opts?: object): node is DoExpression;
2202export function isExportDefaultSpecifier(
2203    node: object | null | undefined,
2204    opts?: object,
2205): node is ExportDefaultSpecifier;
2206export function isExportNamespaceSpecifier(
2207    node: object | null | undefined,
2208    opts?: object,
2209): node is ExportNamespaceSpecifier;
2210export function isRestProperty(node: object | null | undefined, opts?: object): node is RestProperty;
2211export function isSpreadProperty(node: object | null | undefined, opts?: object): node is SpreadProperty;
2212export function isExpression(node: object | null | undefined, opts?: object): node is Expression;
2213export function isBinary(node: object | null | undefined, opts?: object): node is Binary;
2214export function isScopable(node: object | null | undefined, opts?: object): node is Scopable;
2215export function isBlockParent(node: object | null | undefined, opts?: object): node is BlockParent;
2216export function isBlock(node: object | null | undefined, opts?: object): node is Block;
2217export function isStatement(node: object | null | undefined, opts?: object): node is Statement;
2218export function isTerminatorless(node: object | null | undefined, opts?: object): node is Terminatorless;
2219export function isCompletionStatement(node: object | null | undefined, opts?: object): node is CompletionStatement;
2220export function isConditional(node: object | null | undefined, opts?: object): node is Conditional;
2221export function isLoop(node: object | null | undefined, opts?: object): node is Loop;
2222export function isWhile(node: object | null | undefined, opts?: object): node is While;
2223export function isExpressionWrapper(node: object | null | undefined, opts?: object): node is ExpressionWrapper;
2224export function isFor(node: object | null | undefined, opts?: object): node is For;
2225export function isForXStatement(node: object | null | undefined, opts?: object): node is ForXStatement;
2226// tslint:disable-next-line ban-types
2227export function isFunction(node: object | null | undefined, opts?: object): node is Function;
2228export function isFunctionParent(node: object | null | undefined, opts?: object): node is FunctionParent;
2229export function isPureish(node: object | null | undefined, opts?: object): node is Pureish;
2230export function isDeclaration(node: object | null | undefined, opts?: object): node is Declaration;
2231export function isLVal(node: object | null | undefined, opts?: object): node is LVal;
2232export function isLiteral(node: object | null | undefined, opts?: object): node is Literal;
2233export function isImmutable(node: object | null | undefined, opts?: object): node is Immutable;
2234export function isUserWhitespacable(node: object | null | undefined, opts?: object): node is UserWhitespacable;
2235export function isMethod(node: object | null | undefined, opts?: object): node is Method;
2236export function isObjectMember(node: object | null | undefined, opts?: object): node is ObjectMember;
2237export function isProperty(node: object | null | undefined, opts?: object): node is Property;
2238export function isUnaryLike(node: object | null | undefined, opts?: object): node is UnaryLike;
2239export function isPattern(node: object | null | undefined, opts?: object): node is Pattern;
2240export function isClass(node: object | null | undefined, opts?: object): node is Class;
2241export function isModuleDeclaration(node: object | null | undefined, opts?: object): node is ModuleDeclaration;
2242export function isExportDeclaration(node: object | null | undefined, opts?: object): node is ExportDeclaration;
2243export function isModuleSpecifier(node: object | null | undefined, opts?: object): node is ModuleSpecifier;
2244export function isFlow(node: object | null | undefined, opts?: object): node is Flow;
2245export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object): node is FlowBaseAnnotation;
2246export function isFlowDeclaration(node: object | null | undefined, opts?: object): node is FlowDeclaration;
2247export function isJSX(node: object | null | undefined, opts?: object): node is JSX;
2248
2249export function isReferencedIdentifier(
2250    node: object | null | undefined,
2251    opts?: object,
2252): node is Identifier | JSXIdentifier;
2253export function isReferencedMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
2254export function isBindingIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
2255export function isScope(node: object | null | undefined, opts?: object): node is Scopable;
2256export function isReferenced(node: object | null | undefined, opts?: object): boolean;
2257export function isBlockScoped(
2258    node: object | null | undefined,
2259    opts?: object,
2260): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
2261export function isVar(node: object | null | undefined, opts?: object): node is VariableDeclaration;
2262export function isUser(node: object | null | undefined, opts?: object): boolean;
2263export function isGenerated(node: object | null | undefined, opts?: object): boolean;
2264export function isPure(node: object | null | undefined, opts?: object): boolean;
2265
2266export function isTSAnyKeyword(node: object | null | undefined, opts?: object): node is TSAnyKeyword;
2267export function isTSArrayType(node: object | null | undefined, opts?: object): node is TSArrayType;
2268export function isTSAsExpression(node: object | null | undefined, opts?: object): node is TSAsExpression;
2269export function isTSBooleanKeyword(node: object | null | undefined, opts?: object): node is TSBooleanKeyword;
2270export function isTSCallSignatureDeclaration(
2271    node: object | null | undefined,
2272    opts?: object,
2273): node is TSCallSignatureDeclaration;
2274export function isTSConstructSignatureDeclaration(
2275    node: object | null | undefined,
2276    opts?: object,
2277): node is TSTypeElement;
2278export function isTSConstructorType(node: object | null | undefined, opts?: object): node is TSConstructorType;
2279export function isTSDeclareFunction(node: object | null | undefined, opts?: object): node is TSDeclareFunction;
2280export function isTSDeclareMethod(node: object | null | undefined, opts?: object): node is TSDeclareMethod;
2281export function isTSEnumDeclaration(node: object | null | undefined, opts?: object): node is TSEnumDeclaration;
2282export function isTSEnumMember(node: object | null | undefined, opts?: object): node is TSEnumMember;
2283export function isTSExportAssignment(node: object | null | undefined, opts?: object): node is TSExportAssignment;
2284export function isTSExpressionWithTypeArguments(
2285    node: object | null | undefined,
2286    opts?: object,
2287): node is TSExpressionWithTypeArguments;
2288export function isTSExternalModuleReference(
2289    node: object | null | undefined,
2290    opts?: object,
2291): node is TSExternalModuleReference;
2292export function isTSFunctionType(node: object | null | undefined, opts?: object): node is TSFunctionType;
2293export function isTSImportEqualsDeclaration(
2294    node: object | null | undefined,
2295    opts?: object,
2296): node is TSImportEqualsDeclaration;
2297export function isTSIndexSignature(node: object | null | undefined, opts?: object): node is TSIndexSignature;
2298export function isTSIndexedAccessType(node: object | null | undefined, opts?: object): node is TSIndexedAccessType;
2299export function isTSInterfaceBody(node: object | null | undefined, opts?: object): node is TSInterfaceBody;
2300export function isTSInterfaceDeclaration(
2301    node: object | null | undefined,
2302    opts?: object,
2303): node is TSInterfaceDeclaration;
2304export function isTSIntersectionType(node: object | null | undefined, opts?: object): node is TSIntersectionType;
2305export function isTSLiteralType(node: object | null | undefined, opts?: object): node is TSLiteralType;
2306export function isTSMappedType(node: object | null | undefined, opts?: object): node is TSMappedType;
2307export function isTSMethodSignature(node: object | null | undefined, opts?: object): node is TSMethodSignature;
2308export function isTSModuleBlock(node: object | null | undefined, opts?: object): node is TSModuleBlock;
2309export function isTSModuleDeclaration(node: object | null | undefined, opts?: object): node is TSModuleDeclaration;
2310export function isTSNamespaceExportDeclaration(
2311    node: object | null | undefined,
2312    opts?: object,
2313): node is TSNamespaceExportDeclaration;
2314export function isTSNeverKeyword(node: object | null | undefined, opts?: object): node is TSNeverKeyword;
2315export function isTSNonNullExpression(node: object | null | undefined, opts?: object): node is TSNonNullExpression;
2316export function isTSNullKeyword(node: object | null | undefined, opts?: object): node is TSNullKeyword;
2317export function isTSNumberKeyword(node: object | null | undefined, opts?: object): node is TSNumberKeyword;
2318export function isTSObjectKeyword(node: object | null | undefined, opts?: object): node is TSObjectKeyword;
2319export function isTSParameterProperty(node: object | null | undefined, opts?: object): node is TSParameterProperty;
2320export function isTSParenthesizedType(node: object | null | undefined, opts?: object): node is TSParenthesizedType;
2321export function isTSPropertySignature(node: object | null | undefined, opts?: object): node is TSPropertySignature;
2322export function isTSQualifiedName(node: object | null | undefined, opts?: object): node is TSQualifiedName;
2323export function isTSStringKeyword(node: object | null | undefined, opts?: object): node is TSStringKeyword;
2324export function isTSSymbolKeyword(node: object | null | undefined, opts?: object): node is TSSymbolKeyword;
2325export function isTSThisType(node: object | null | undefined, opts?: object): node is TSThisType;
2326export function isTSTupleType(node: object | null | undefined, opts?: object): node is TSTupleType;
2327export function isTSTypeAliasDeclaration(
2328    node: object | null | undefined,
2329    opts?: object,
2330): node is TSTypeAliasDeclaration;
2331export function isTSTypeAnnotation(node: object | null | undefined, opts?: object): node is TSTypeAnnotation;
2332export function isTSTypeAssertion(node: object | null | undefined, opts?: object): node is TSTypeAssertion;
2333export function isTSTypeLiteral(node: object | null | undefined, opts?: object): node is TSTypeLiteral;
2334export function isTSTypeOperator(node: object | null | undefined, opts?: object): node is TSTypeOperator;
2335export function isTSTypeParameter(node: object | null | undefined, opts?: object): node is TSTypeParameter;
2336export function isTSTypeParameterDeclaration(
2337    node: object | null | undefined,
2338    opts?: object,
2339): node is TSTypeParameterDeclaration;
2340export function isTSTypeParameterInstantiation(
2341    node: object | null | undefined,
2342    opts?: object,
2343): node is TSTypeParameterInstantiation;
2344export function isTSTypePredicate(node: object | null | undefined, opts?: object): node is TSTypePredicate;
2345export function isTSTypeQuery(node: object | null | undefined, opts?: object): node is TSTypeQuery;
2346export function isTSTypeReference(node: object | null | undefined, opts?: object): node is TSTypeReference;
2347export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object): node is TSUndefinedKeyword;
2348export function isTSUnionType(node: object | null | undefined, opts?: object): node is TSUnionType;
2349export function isTSVoidKeyword(node: object | null | undefined, opts?: object): node is TSVoidKeyword;
2350
2351// React specific
2352export interface ReactHelpers {
2353    isCompatTag(tagName?: string): boolean;
2354    buildChildren(node: object): Node[];
2355}
2356export const react: ReactHelpers;
2357
2358export function assertArrayExpression(node: object | null | undefined, opts?: object): asserts node is ArrayExpression;
2359export function assertAssignmentExpression(
2360    node: object | null | undefined,
2361    opts?: object,
2362): asserts node is AssignmentExpression;
2363export function assertBinaryExpression(
2364    node: object | null | undefined,
2365    opts?: object,
2366): asserts node is BinaryExpression;
2367export function assertDirective(node: object | null | undefined, opts?: object): asserts node is Directive;
2368export function assertDirectiveLiteral(
2369    node: object | null | undefined,
2370    opts?: object,
2371): asserts node is DirectiveLiteral;
2372export function assertBlockStatement(node: object | null | undefined, opts?: object): asserts node is BlockStatement;
2373export function assertBreakStatement(node: object | null | undefined, opts?: object): asserts node is BreakStatement;
2374export function assertCallExpression(node: object | null | undefined, opts?: object): asserts node is CallExpression;
2375export function assertCatchClause(node: object | null | undefined, opts?: object): asserts node is CatchClause;
2376export function assertConditionalExpression(
2377    node: object | null | undefined,
2378    opts?: object,
2379): asserts node is ConditionalExpression;
2380export function assertContinueStatement(
2381    node: object | null | undefined,
2382    opts?: object,
2383): asserts node is ContinueStatement;
2384export function assertDebuggerStatement(
2385    node: object | null | undefined,
2386    opts?: object,
2387): asserts node is DebuggerStatement;
2388export function assertDoWhileStatement(
2389    node: object | null | undefined,
2390    opts?: object,
2391): asserts node is DoWhileStatement;
2392export function assertEmptyStatement(node: object | null | undefined, opts?: object): asserts node is EmptyStatement;
2393export function assertExpressionStatement(
2394    node: object | null | undefined,
2395    opts?: object,
2396): asserts node is ExpressionStatement;
2397export function assertFile(node: object | null | undefined, opts?: object): asserts node is File;
2398export function assertForInStatement(node: object | null | undefined, opts?: object): asserts node is ForInStatement;
2399export function assertForStatement(node: object | null | undefined, opts?: object): asserts node is ForStatement;
2400export function assertFunctionDeclaration(
2401    node: object | null | undefined,
2402    opts?: object,
2403): asserts node is FunctionDeclaration;
2404export function assertFunctionExpression(
2405    node: object | null | undefined,
2406    opts?: object,
2407): asserts node is FunctionExpression;
2408export function assertIdentifier(node: object | null | undefined, opts?: object): asserts node is Identifier;
2409export function assertIfStatement(node: object | null | undefined, opts?: object): asserts node is IfStatement;
2410export function assertLabeledStatement(
2411    node: object | null | undefined,
2412    opts?: object,
2413): asserts node is LabeledStatement;
2414export function assertStringLiteral(node: object | null | undefined, opts?: object): asserts node is StringLiteral;
2415export function assertNumericLiteral(node: object | null | undefined, opts?: object): asserts node is NumericLiteral;
2416
2417/** @deprecated Use `assertNumericLiteral` */
2418export function assertNumberLiteral(node: object | null | undefined, opts?: object): asserts node is NumericLiteral;
2419export function assertNullLiteral(node: object | null | undefined, opts?: object): asserts node is NullLiteral;
2420export function assertBooleanLiteral(node: object | null | undefined, opts?: object): asserts node is BooleanLiteral;
2421export function assertRegExpLiteral(node: object | null | undefined, opts?: object): asserts node is RegExpLiteral;
2422
2423/** @deprecated Use `assertRegExpLiteral` */
2424export function assertRegexLiteral(node: object | null | undefined, opts?: object): asserts node is RegExpLiteral;
2425export function assertLogicalExpression(
2426    node: object | null | undefined,
2427    opts?: object,
2428): asserts node is LogicalExpression;
2429export function assertMemberExpression(
2430    node: object | null | undefined,
2431    opts?: object,
2432): asserts node is MemberExpression;
2433export function assertNewExpression(node: object | null | undefined, opts?: object): asserts node is NewExpression;
2434export function assertProgram(node: object | null | undefined, opts?: object): asserts node is Program;
2435export function assertObjectExpression(
2436    node: object | null | undefined,
2437    opts?: object,
2438): asserts node is ObjectExpression;
2439export function assertObjectMethod(node: object | null | undefined, opts?: object): asserts node is ObjectMethod;
2440export function assertObjectProperty(node: object | null | undefined, opts?: object): asserts node is ObjectProperty;
2441export function assertRestElement(node: object | null | undefined, opts?: object): asserts node is RestElement;
2442export function assertReturnStatement(node: object | null | undefined, opts?: object): asserts node is ReturnStatement;
2443export function assertSequenceExpression(
2444    node: object | null | undefined,
2445    opts?: object,
2446): asserts node is SequenceExpression;
2447export function assertSwitchCase(node: object | null | undefined, opts?: object): asserts node is SwitchCase;
2448export function assertSwitchStatement(node: object | null | undefined, opts?: object): asserts node is SwitchStatement;
2449export function assertThisExpression(node: object | null | undefined, opts?: object): asserts node is ThisExpression;
2450export function assertThrowStatement(node: object | null | undefined, opts?: object): asserts node is ThrowStatement;
2451export function assertTryStatement(node: object | null | undefined, opts?: object): asserts node is TryStatement;
2452export function assertUnaryExpression(node: object | null | undefined, opts?: object): asserts node is UnaryExpression;
2453export function assertUpdateExpression(
2454    node: object | null | undefined,
2455    opts?: object,
2456): asserts node is UpdateExpression;
2457export function assertVariableDeclaration(
2458    node: object | null | undefined,
2459    opts?: object,
2460): asserts node is VariableDeclaration;
2461export function assertVariableDeclarator(
2462    node: object | null | undefined,
2463    opts?: object,
2464): asserts node is VariableDeclarator;
2465export function assertWhileStatement(node: object | null | undefined, opts?: object): asserts node is WhileStatement;
2466export function assertWithStatement(node: object | null | undefined, opts?: object): asserts node is WithStatement;
2467export function assertAssignmentPattern(
2468    node: object | null | undefined,
2469    opts?: object,
2470): asserts node is AssignmentPattern;
2471export function assertArrayPattern(node: object | null | undefined, opts?: object): asserts node is ArrayPattern;
2472export function assertArrowFunctionExpression(
2473    node: object | null | undefined,
2474    opts?: object,
2475): asserts node is ArrowFunctionExpression;
2476export function assertClassBody(node: object | null | undefined, opts?: object): asserts node is ClassBody;
2477export function assertClassDeclaration(
2478    node: object | null | undefined,
2479    opts?: object,
2480): asserts node is ClassDeclaration;
2481export function assertClassExpression(node: object | null | undefined, opts?: object): asserts node is ClassExpression;
2482export function assertExportAllDeclaration(
2483    node: object | null | undefined,
2484    opts?: object,
2485): asserts node is ExportAllDeclaration;
2486export function assertExportDefaultDeclaration(
2487    node: object | null | undefined,
2488    opts?: object,
2489): asserts node is ExportDefaultDeclaration;
2490export function assertExportNamedDeclaration(
2491    node: object | null | undefined,
2492    opts?: object,
2493): asserts node is ExportNamedDeclaration;
2494export function assertExportSpecifier(node: object | null | undefined, opts?: object): asserts node is ExportSpecifier;
2495export function assertForOfStatement(node: object | null | undefined, opts?: object): asserts node is ForOfStatement;
2496export function assertImportDeclaration(
2497    node: object | null | undefined,
2498    opts?: object,
2499): asserts node is ImportDeclaration;
2500export function assertImportDefaultSpecifier(
2501    node: object | null | undefined,
2502    opts?: object,
2503): asserts node is ImportDefaultSpecifier;
2504export function assertImportNamespaceSpecifier(
2505    node: object | null | undefined,
2506    opts?: object,
2507): asserts node is ImportNamespaceSpecifier;
2508export function assertImportSpecifier(node: object | null | undefined, opts?: object): asserts node is ImportSpecifier;
2509export function assertMetaProperty(node: object | null | undefined, opts?: object): asserts node is MetaProperty;
2510export function assertClassMethod(node: object | null | undefined, opts?: object): asserts node is ClassMethod;
2511export function assertObjectPattern(node: object | null | undefined, opts?: object): asserts node is ObjectPattern;
2512export function assertSpreadElement(node: object | null | undefined, opts?: object): asserts node is SpreadElement;
2513export function assertSuper(node: object | null | undefined, opts?: object): asserts node is Super;
2514export function assertTaggedTemplateExpression(
2515    node: object | null | undefined,
2516    opts?: object,
2517): asserts node is TaggedTemplateExpression;
2518export function assertTemplateElement(node: object | null | undefined, opts?: object): asserts node is TemplateElement;
2519export function assertTemplateLiteral(node: object | null | undefined, opts?: object): asserts node is TemplateLiteral;
2520export function assertYieldExpression(node: object | null | undefined, opts?: object): asserts node is YieldExpression;
2521export function assertAnyTypeAnnotation(
2522    node: object | null | undefined,
2523    opts?: object,
2524): asserts node is AnyTypeAnnotation;
2525export function assertArrayTypeAnnotation(
2526    node: object | null | undefined,
2527    opts?: object,
2528): asserts node is ArrayTypeAnnotation;
2529export function assertBooleanTypeAnnotation(
2530    node: object | null | undefined,
2531    opts?: object,
2532): asserts node is BooleanTypeAnnotation;
2533export function assertBooleanLiteralTypeAnnotation(
2534    node: object | null | undefined,
2535    opts?: object,
2536): asserts node is BooleanLiteralTypeAnnotation;
2537export function assertNullLiteralTypeAnnotation(
2538    node: object | null | undefined,
2539    opts?: object,
2540): asserts node is NullLiteralTypeAnnotation;
2541export function assertClassImplements(node: object | null | undefined, opts?: object): asserts node is ClassImplements;
2542export function assertClassProperty(node: object | null | undefined, opts?: object): asserts node is ClassProperty;
2543export function assertDeclareClass(node: object | null | undefined, opts?: object): asserts node is DeclareClass;
2544export function assertDeclareFunction(node: object | null | undefined, opts?: object): asserts node is DeclareFunction;
2545export function assertDeclareInterface(
2546    node: object | null | undefined,
2547    opts?: object,
2548): asserts node is DeclareInterface;
2549export function assertDeclareModule(node: object | null | undefined, opts?: object): asserts node is DeclareModule;
2550export function assertDeclareTypeAlias(
2551    node: object | null | undefined,
2552    opts?: object,
2553): asserts node is DeclareTypeAlias;
2554export function assertDeclareVariable(node: object | null | undefined, opts?: object): asserts node is DeclareVariable;
2555export function assertExistentialTypeParam(
2556    node: object | null | undefined,
2557    opts?: object,
2558): asserts node is ExistentialTypeParam;
2559export function assertFunctionTypeAnnotation(
2560    node: object | null | undefined,
2561    opts?: object,
2562): asserts node is FunctionTypeAnnotation;
2563export function assertFunctionTypeParam(
2564    node: object | null | undefined,
2565    opts?: object,
2566): asserts node is FunctionTypeParam;
2567export function assertGenericTypeAnnotation(
2568    node: object | null | undefined,
2569    opts?: object,
2570): asserts node is GenericTypeAnnotation;
2571export function assertInterfaceExtends(
2572    node: object | null | undefined,
2573    opts?: object,
2574): asserts node is InterfaceExtends;
2575export function assertInterfaceDeclaration(
2576    node: object | null | undefined,
2577    opts?: object,
2578): asserts node is InterfaceDeclaration;
2579export function assertIntersectionTypeAnnotation(
2580    node: object | null | undefined,
2581    opts?: object,
2582): asserts node is IntersectionTypeAnnotation;
2583export function assertMixedTypeAnnotation(
2584    node: object | null | undefined,
2585    opts?: object,
2586): asserts node is MixedTypeAnnotation;
2587export function assertNullableTypeAnnotation(
2588    node: object | null | undefined,
2589    opts?: object,
2590): asserts node is NullableTypeAnnotation;
2591export function assertNumericLiteralTypeAnnotation(
2592    node: object | null | undefined,
2593    opts?: object,
2594): asserts node is NumericLiteralTypeAnnotation;
2595export function assertNumberTypeAnnotation(
2596    node: object | null | undefined,
2597    opts?: object,
2598): asserts node is NumberTypeAnnotation;
2599export function assertStringLiteralTypeAnnotation(
2600    node: object | null | undefined,
2601    opts?: object,
2602): asserts node is StringLiteralTypeAnnotation;
2603export function assertStringTypeAnnotation(
2604    node: object | null | undefined,
2605    opts?: object,
2606): asserts node is StringTypeAnnotation;
2607export function assertThisTypeAnnotation(
2608    node: object | null | undefined,
2609    opts?: object,
2610): asserts node is ThisTypeAnnotation;
2611export function assertTupleTypeAnnotation(
2612    node: object | null | undefined,
2613    opts?: object,
2614): asserts node is TupleTypeAnnotation;
2615export function assertTypeofTypeAnnotation(
2616    node: object | null | undefined,
2617    opts?: object,
2618): asserts node is TypeofTypeAnnotation;
2619export function assertTypeAlias(node: object | null | undefined, opts?: object): asserts node is TypeAlias;
2620export function assertTypeAnnotation(node: object | null | undefined, opts?: object): asserts node is TypeAnnotation;
2621export function assertTypeCastExpression(
2622    node: object | null | undefined,
2623    opts?: object,
2624): asserts node is TypeCastExpression;
2625export function assertTypeParameter(node: object | null | undefined, opts?: object): asserts node is TypeParameter;
2626export function assertTypeParameterDeclaration(
2627    node: object | null | undefined,
2628    opts?: object,
2629): asserts node is TypeParameterDeclaration;
2630export function assertTypeParameterInstantiation(
2631    node: object | null | undefined,
2632    opts?: object,
2633): asserts node is TypeParameterInstantiation;
2634export function assertObjectTypeAnnotation(
2635    node: object | null | undefined,
2636    opts?: object,
2637): asserts node is ObjectTypeAnnotation;
2638export function assertObjectTypeCallProperty(
2639    node: object | null | undefined,
2640    opts?: object,
2641): asserts node is ObjectTypeCallProperty;
2642export function assertObjectTypeIndexer(
2643    node: object | null | undefined,
2644    opts?: object,
2645): asserts node is ObjectTypeIndexer;
2646export function assertObjectTypeProperty(
2647    node: object | null | undefined,
2648    opts?: object,
2649): asserts node is ObjectTypeProperty;
2650export function assertQualifiedTypeIdentifier(
2651    node: object | null | undefined,
2652    opts?: object,
2653): asserts node is QualifiedTypeIdentifier;
2654export function assertUnionTypeAnnotation(
2655    node: object | null | undefined,
2656    opts?: object,
2657): asserts node is UnionTypeAnnotation;
2658export function assertVoidTypeAnnotation(
2659    node: object | null | undefined,
2660    opts?: object,
2661): asserts node is VoidTypeAnnotation;
2662export function assertJSXAttribute(node: object | null | undefined, opts?: object): asserts node is JSXAttribute;
2663export function assertJSXClosingElement(
2664    node: object | null | undefined,
2665    opts?: object,
2666): asserts node is JSXClosingElement;
2667export function assertJSXElement(node: object | null | undefined, opts?: object): asserts node is JSXElement;
2668export function assertJSXEmptyExpression(
2669    node: object | null | undefined,
2670    opts?: object,
2671): asserts node is JSXEmptyExpression;
2672export function assertJSXExpressionContainer(
2673    node: object | null | undefined,
2674    opts?: object,
2675): asserts node is JSXExpressionContainer;
2676export function assertJSXIdentifier(node: object | null | undefined, opts?: object): asserts node is JSXIdentifier;
2677export function assertJSXMemberExpression(
2678    node: object | null | undefined,
2679    opts?: object,
2680): asserts node is JSXMemberExpression;
2681export function assertJSXNamespacedName(
2682    node: object | null | undefined,
2683    opts?: object,
2684): asserts node is JSXNamespacedName;
2685export function assertJSXOpeningElement(
2686    node: object | null | undefined,
2687    opts?: object,
2688): asserts node is JSXOpeningElement;
2689export function assertJSXSpreadAttribute(
2690    node: object | null | undefined,
2691    opts?: object,
2692): asserts node is JSXSpreadAttribute;
2693export function assertJSXText(node: object | null | undefined, opts?: object): asserts node is JSXText;
2694export function assertNoop(node: object | null | undefined, opts?: object): asserts node is Noop;
2695export function assertParenthesizedExpression(
2696    node: object | null | undefined,
2697    opts?: object,
2698): asserts node is ParenthesizedExpression;
2699export function assertAwaitExpression(node: object | null | undefined, opts?: object): asserts node is AwaitExpression;
2700export function assertBindExpression(node: object | null | undefined, opts?: object): asserts node is BindExpression;
2701export function assertDecorator(node: object | null | undefined, opts?: object): asserts node is Decorator;
2702export function assertDoExpression(node: object | null | undefined, opts?: object): asserts node is DoExpression;
2703export function assertExportDefaultSpecifier(
2704    node: object | null | undefined,
2705    opts?: object,
2706): asserts node is ExportDefaultSpecifier;
2707export function assertExportNamespaceSpecifier(
2708    node: object | null | undefined,
2709    opts?: object,
2710): asserts node is ExportNamespaceSpecifier;
2711export function assertRestProperty(node: object | null | undefined, opts?: object): asserts node is RestProperty;
2712export function assertSpreadProperty(node: object | null | undefined, opts?: object): asserts node is SpreadProperty;
2713export function assertExpression(node: object | null | undefined, opts?: object): asserts node is Expression;
2714export function assertBinary(node: object | null | undefined, opts?: object): asserts node is Binary;
2715export function assertScopable(node: object | null | undefined, opts?: object): asserts node is Scopable;
2716export function assertBlockParent(node: object | null | undefined, opts?: object): asserts node is BlockParent;
2717export function assertBlock(node: object | null | undefined, opts?: object): asserts node is Block;
2718export function assertStatement(node: object | null | undefined, opts?: object): asserts node is Statement;
2719export function assertTerminatorless(node: object | null | undefined, opts?: object): asserts node is Terminatorless;
2720export function assertCompletionStatement(
2721    node: object | null | undefined,
2722    opts?: object,
2723): asserts node is CompletionStatement;
2724export function assertConditional(node: object | null | undefined, opts?: object): asserts node is Conditional;
2725export function assertLoop(node: object | null | undefined, opts?: object): asserts node is Loop;
2726export function assertWhile(node: object | null | undefined, opts?: object): asserts node is While;
2727export function assertExpressionWrapper(
2728    node: object | null | undefined,
2729    opts?: object,
2730): asserts node is ExpressionWrapper;
2731export function assertFor(node: object | null | undefined, opts?: object): asserts node is For;
2732export function assertForXStatement(node: object | null | undefined, opts?: object): asserts node is ForXStatement;
2733// tslint:disable-next-line ban-types
2734export function assertFunction(node: object | null | undefined, opts?: object): asserts node is Function;
2735export function assertFunctionParent(node: object | null | undefined, opts?: object): asserts node is FunctionParent;
2736export function assertPureish(node: object | null | undefined, opts?: object): asserts node is Pureish;
2737export function assertDeclaration(node: object | null | undefined, opts?: object): asserts node is Declaration;
2738export function assertLVal(node: object | null | undefined, opts?: object): asserts node is LVal;
2739export function assertLiteral(node: object | null | undefined, opts?: object): asserts node is Literal;
2740export function assertImmutable(node: object | null | undefined, opts?: object): asserts node is Immutable;
2741export function assertUserWhitespacable(
2742    node: object | null | undefined,
2743    opts?: object,
2744): asserts node is UserWhitespacable;
2745export function assertMethod(node: object | null | undefined, opts?: object): asserts node is Method;
2746export function assertObjectMember(node: object | null | undefined, opts?: object): asserts node is ObjectMember;
2747export function assertProperty(node: object | null | undefined, opts?: object): asserts node is Property;
2748export function assertUnaryLike(node: object | null | undefined, opts?: object): asserts node is UnaryLike;
2749export function assertPattern(node: object | null | undefined, opts?: object): asserts node is Pattern;
2750export function assertClass(node: object | null | undefined, opts?: object): asserts node is Class;
2751export function assertModuleDeclaration(
2752    node: object | null | undefined,
2753    opts?: object,
2754): asserts node is ModuleDeclaration;
2755export function assertExportDeclaration(
2756    node: object | null | undefined,
2757    opts?: object,
2758): asserts node is ExportDeclaration;
2759export function assertModuleSpecifier(node: object | null | undefined, opts?: object): asserts node is ModuleSpecifier;
2760export function assertFlow(node: object | null | undefined, opts?: object): asserts node is Flow;
2761export function assertFlowBaseAnnotation(
2762    node: object | null | undefined,
2763    opts?: object,
2764): asserts node is FlowBaseAnnotation;
2765export function assertFlowDeclaration(node: object | null | undefined, opts?: object): asserts node is FlowDeclaration;
2766export function assertJSX(node: object | null | undefined, opts?: object): asserts node is JSX;
2767
2768export function assertTSAnyKeyword(node: object | null | undefined, opts?: object): asserts node is TSAnyKeyword;
2769export function assertTSArrayType(node: object | null | undefined, opts?: object): asserts node is TSArrayType;
2770export function assertTSAsExpression(node: object | null | undefined, opts?: object): asserts node is TSAsExpression;
2771export function assertTSBooleanKeyword(
2772    node: object | null | undefined,
2773    opts?: object,
2774): asserts node is TSBooleanKeyword;
2775export function assertTSCallSignatureDeclaration(
2776    node: object | null | undefined,
2777    opts?: object,
2778): asserts node is TSCallSignatureDeclaration;
2779export function assertTSConstructSignatureDeclaration(
2780    node: object | null | undefined,
2781    opts?: object,
2782): asserts node is TSConstructSignatureDeclaration;
2783export function assertTSConstructorType(
2784    node: object | null | undefined,
2785    opts?: object,
2786): asserts node is TSConstructorType;
2787export function assertTSDeclareFunction(
2788    node: object | null | undefined,
2789    opts?: object,
2790): asserts node is TSDeclareFunction;
2791export function assertTSDeclareMethod(node: object | null | undefined, opts?: object): asserts node is TSDeclareMethod;
2792export function assertTSEnumDeclaration(
2793    node: object | null | undefined,
2794    opts?: object,
2795): asserts node is TSEnumDeclaration;
2796export function assertTSEnumMember(node: object | null | undefined, opts?: object): asserts node is TSEnumMember;
2797export function assertTSExportAssignment(
2798    node: object | null | undefined,
2799    opts?: object,
2800): asserts node is TSExportAssignment;
2801export function assertTSExpressionWithTypeArguments(
2802    node: object | null | undefined,
2803    opts?: object,
2804): asserts node is TSExpressionWithTypeArguments;
2805export function assertTSExternalModuleReference(
2806    node: object | null | undefined,
2807    opts?: object,
2808): asserts node is TSExternalModuleReference;
2809export function assertTSFunctionType(node: object | null | undefined, opts?: object): asserts node is TSFunctionType;
2810export function assertTSImportEqualsDeclaration(
2811    node: object | null | undefined,
2812    opts?: object,
2813): asserts node is TSImportEqualsDeclaration;
2814export function assertTSIndexSignature(
2815    node: object | null | undefined,
2816    opts?: object,
2817): asserts node is TSIndexSignature;
2818export function assertTSIndexedAccessType(
2819    node: object | null | undefined,
2820    opts?: object,
2821): asserts node is TSIndexedAccessType;
2822export function assertTSInterfaceBody(node: object | null | undefined, opts?: object): asserts node is TSInterfaceBody;
2823export function assertTSInterfaceDeclaration(
2824    node: object | null | undefined,
2825    opts?: object,
2826): asserts node is TSInterfaceDeclaration;
2827export function assertTSIntersectionType(
2828    node: object | null | undefined,
2829    opts?: object,
2830): asserts node is TSIntersectionType;
2831export function assertTSLiteralType(node: object | null | undefined, opts?: object): asserts node is TSLiteralType;
2832export function assertTSMappedType(node: object | null | undefined, opts?: object): asserts node is TSMappedType;
2833export function assertTSMethodSignature(
2834    node: object | null | undefined,
2835    opts?: object,
2836): asserts node is TSMethodSignature;
2837export function assertTSModuleBlock(node: object | null | undefined, opts?: object): asserts node is TSModuleBlock;
2838export function assertTSModuleDeclaration(
2839    node: object | null | undefined,
2840    opts?: object,
2841): asserts node is TSModuleDeclaration;
2842export function assertTSNamespaceExportDeclaration(
2843    node: object | null | undefined,
2844    opts?: object,
2845): asserts node is TSNamespaceExportDeclaration;
2846export function assertTSNeverKeyword(node: object | null | undefined, opts?: object): asserts node is TSNeverKeyword;
2847export function assertTSNonNullExpression(
2848    node: object | null | undefined,
2849    opts?: object,
2850): asserts node is TSNonNullExpression;
2851export function assertTSNullKeyword(node: object | null | undefined, opts?: object): asserts node is TSNullKeyword;
2852export function assertTSNumberKeyword(node: object | null | undefined, opts?: object): asserts node is TSNumberKeyword;
2853export function assertTSObjectKeyword(node: object | null | undefined, opts?: object): asserts node is TSObjectKeyword;
2854export function assertTSParameterProperty(
2855    node: object | null | undefined,
2856    opts?: object,
2857): asserts node is TSParameterProperty;
2858export function assertTSParenthesizedType(
2859    node: object | null | undefined,
2860    opts?: object,
2861): asserts node is TSParenthesizedType;
2862export function assertTSPropertySignature(
2863    node: object | null | undefined,
2864    opts?: object,
2865): asserts node is TSPropertySignature;
2866export function assertTSQualifiedName(node: object | null | undefined, opts?: object): asserts node is TSQualifiedName;
2867export function assertTSStringKeyword(node: object | null | undefined, opts?: object): asserts node is TSStringKeyword;
2868export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object): asserts node is TSSymbolKeyword;
2869export function assertTSThisType(node: object | null | undefined, opts?: object): asserts node is TSThisType;
2870export function assertTSTupleType(node: object | null | undefined, opts?: object): asserts node is TSTupleType;
2871export function assertTSTypeAliasDeclaration(
2872    node: object | null | undefined,
2873    opts?: object,
2874): asserts node is TSTypeAliasDeclaration;
2875export function assertTSTypeAnnotation(
2876    node: object | null | undefined,
2877    opts?: object,
2878): asserts node is TSTypeAnnotation;
2879export function assertTSTypeAssertion(node: object | null | undefined, opts?: object): asserts node is TSTypeAssertion;
2880export function assertTSTypeLiteral(node: object | null | undefined, opts?: object): asserts node is TSTypeLiteral;
2881export function assertTSTypeOperator(node: object | null | undefined, opts?: object): asserts node is TSTypeOperator;
2882export function assertTSTypeParameter(node: object | null | undefined, opts?: object): asserts node is TSTypeParameter;
2883export function assertTSTypeParameterDeclaration(
2884    node: object | null | undefined,
2885    opts?: object,
2886): asserts node is TSTypeParameterDeclaration;
2887export function assertTSTypeParameterInstantiation(
2888    node: object | null | undefined,
2889    opts?: object,
2890): asserts node is TSTypeParameterInstantiation;
2891export function assertTSTypePredicate(node: object | null | undefined, opts?: object): asserts node is TSTypePredicate;
2892export function assertTSTypeQuery(node: object | null | undefined, opts?: object): asserts node is TSTypeQuery;
2893export function assertTSTypeReference(node: object | null | undefined, opts?: object): asserts node is TSTypeReference;
2894export function assertTSUndefinedKeyword(
2895    node: object | null | undefined,
2896    opts?: object,
2897): asserts node is TSUndefinedKeyword;
2898export function assertTSUnionType(node: object | null | undefined, opts?: object): asserts node is TSUnionType;
2899export function assertTSVoidKeyword(node: object | null | undefined, opts?: object): asserts node is TSVoidKeyword;
2900