UNPKG

115 kBTypeScriptView Raw
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