UNPKG

104 kBTypeScriptView Raw
1export interface Comment {
2 value: string;
3 start: number;
4 end: number;
5 loc: SourceLocation;
6}
7
8export interface CommentBlock extends Comment {
9 type: "CommentBlock";
10}
11
12export interface CommentLine extends Comment {
13 type: "CommentLine";
14}
15
16export interface SourceLocation {
17 start: {
18 line: number;
19 column: number;
20 };
21
22 end: {
23 line: number;
24 column: number;
25 };
26}
27
28export interface Node {
29 type: string;
30 leadingComments?: Comment[];
31 innerComments?: Comment[];
32 trailingComments?: Comment[];
33 start: number;
34 end: number;
35 loc: SourceLocation;
36}
37
38export interface ArrayExpression extends Node {
39 type: "ArrayExpression";
40 elements: Array<null | Expression | SpreadElement>;
41}
42
43export interface AssignmentExpression extends Node {
44 type: "AssignmentExpression";
45 operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=";
46 left: LVal;
47 right: Expression;
48}
49
50export interface BinaryExpression extends Node {
51 type: "BinaryExpression";
52 operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
53 left: Expression;
54 right: Expression;
55}
56
57export interface Directive extends Node {
58 type: "Directive";
59 value: DirectiveLiteral;
60}
61
62export interface DirectiveLiteral extends Node {
63 type: "DirectiveLiteral";
64 value: string;
65}
66
67export interface BlockStatement extends Node {
68 type: "BlockStatement";
69 directives?: Directive[];
70 body: Statement[];
71}
72
73export interface BreakStatement extends Node {
74 type: "BreakStatement";
75 label: Identifier;
76}
77
78export interface CallExpression extends Node {
79 type: "CallExpression";
80 callee: Expression | Super;
81 arguments: Array<Expression | SpreadElement>;
82}
83
84export interface CatchClause extends Node {
85 type: "CatchClause";
86 param: Identifier;
87 body: BlockStatement;
88}
89
90export interface ConditionalExpression extends Node {
91 type: "ConditionalExpression";
92 test: Expression;
93 consequent: Expression;
94 alternate: Expression;
95}
96
97export interface ContinueStatement extends Node {
98 type: "ContinueStatement";
99 label: Identifier;
100}
101
102export interface DebuggerStatement extends Node {
103 type: "DebuggerStatement";
104}
105
106export interface DoWhileStatement extends Node {
107 type: "DoWhileStatement";
108 test: Expression;
109 body: Statement;
110}
111
112export interface EmptyStatement extends Node {
113 type: "EmptyStatement";
114}
115
116export interface ExpressionStatement extends Node {
117 type: "ExpressionStatement";
118 expression: Expression;
119}
120
121export interface File extends Node {
122 type: "File";
123 program: Program;
124 comments: Comment[];
125 tokens: any[];
126}
127
128export interface ForInStatement extends Node {
129 type: "ForInStatement";
130 left: VariableDeclaration | LVal;
131 right: Expression;
132 body: Statement;
133}
134
135export interface ForStatement extends Node {
136 type: "ForStatement";
137 init: VariableDeclaration | Expression;
138 test: Expression;
139 update: Expression;
140 body: Statement;
141}
142
143export interface FunctionDeclaration extends Node {
144 type: "FunctionDeclaration";
145 id: Identifier;
146 params: LVal[];
147 body: BlockStatement;
148 generator: boolean;
149 async: boolean;
150 returnType?: TypeAnnotation;
151 typeParameters?: TypeParameterDeclaration;
152}
153
154export interface FunctionExpression extends Node {
155 type: "FunctionExpression";
156 id: Identifier;
157 params: LVal[];
158 body: BlockStatement;
159 generator: boolean;
160 async: boolean;
161 returnType?: TypeAnnotation;
162 typeParameters?: TypeParameterDeclaration;
163}
164
165export interface Identifier extends Node {
166 type: "Identifier";
167 name: string;
168 typeAnnotation?: TypeAnnotation;
169}
170
171export interface IfStatement extends Node {
172 type: "IfStatement";
173 test: Expression;
174 consequent: Statement;
175 alternate: Statement;
176}
177
178export interface LabeledStatement extends Node {
179 type: "LabeledStatement";
180 label: Identifier;
181 body: Statement;
182}
183
184export interface StringLiteral extends Node {
185 type: "StringLiteral";
186 value: string;
187}
188
189export interface NumericLiteral extends Node {
190 type: "NumericLiteral";
191 value: number;
192}
193
194export interface NullLiteral extends Node {
195 type: "NullLiteral";
196}
197
198export interface BooleanLiteral extends Node {
199 type: "BooleanLiteral";
200 value: boolean;
201}
202
203export interface RegExpLiteral extends Node {
204 type: "RegExpLiteral";
205 pattern: string;
206 flags?: string;
207}
208
209export interface LogicalExpression extends Node {
210 type: "LogicalExpression";
211 operator: "||" | "&&";
212 left: Expression;
213 right: Expression;
214}
215
216export interface MemberExpression extends Node {
217 type: "MemberExpression";
218 object: Expression | Super;
219 property: Expression;
220 computed: boolean;
221}
222
223export interface NewExpression extends Node {
224 type: "NewExpression";
225 callee: Expression | Super;
226 arguments: Array<Expression | SpreadElement>;
227}
228
229export interface Program extends Node {
230 type: "Program";
231 sourceType: "script" | "module";
232 directives?: Directive[];
233 body: Array<Statement | ModuleDeclaration>;
234}
235
236export interface ObjectExpression extends Node {
237 type: "ObjectExpression";
238 properties: Array<ObjectProperty | ObjectMethod | SpreadProperty>;
239}
240
241export interface ObjectMethod extends Node {
242 type: "ObjectMethod";
243 key: Expression;
244 kind: "get" | "set" | "method";
245 shorthand: boolean;
246 computed: boolean;
247 value: Expression;
248 decorators?: Decorator[];
249 id: Identifier;
250 params: LVal[];
251 body: BlockStatement;
252 generator: boolean;
253 async: boolean;
254 returnType?: TypeAnnotation;
255 typeParameters?: TypeParameterDeclaration;
256}
257
258export interface ObjectProperty extends Node {
259 type: "ObjectProperty";
260 key: Expression;
261 computed: boolean;
262 value: Expression;
263 decorators?: Decorator[];
264 shorthand: boolean;
265}
266
267export interface RestElement extends Node {
268 type: "RestElement";
269 argument: LVal;
270 typeAnnotation?: TypeAnnotation;
271}
272
273export interface ReturnStatement extends Node {
274 type: "ReturnStatement";
275 argument: Expression;
276}
277
278export interface SequenceExpression extends Node {
279 type: "SequenceExpression";
280 expressions: Expression[];
281}
282
283export interface SwitchCase extends Node {
284 type: "SwitchCase";
285 test: Expression;
286 consequent: Statement[];
287}
288
289export interface SwitchStatement extends Node {
290 type: "SwitchStatement";
291 discriminant: Expression;
292 cases: SwitchCase[];
293}
294
295export interface ThisExpression extends Node {
296 type: "ThisExpression";
297}
298
299export interface ThrowStatement extends Node {
300 type: "ThrowStatement";
301 argument: Expression;
302}
303
304export interface TryStatement extends Node {
305 type: "TryStatement";
306 block: BlockStatement;
307 handler: CatchClause;
308 finalizer: BlockStatement;
309}
310
311export interface UnaryExpression extends Node {
312 type: "UnaryExpression";
313 operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
314 prefix: boolean;
315 argument: Expression;
316}
317
318export interface UpdateExpression extends Node {
319 type: "UpdateExpression";
320 operator: "++" | "--";
321 prefix: boolean;
322 argument: Expression;
323}
324
325export interface VariableDeclaration extends Node {
326 type: "VariableDeclaration";
327 declarations: VariableDeclarator[];
328 kind: "var" | "let" | "const";
329}
330
331export interface VariableDeclarator extends Node {
332 type: "VariableDeclarator";
333 id: LVal;
334 init: Expression;
335}
336
337export interface WhileStatement extends Node {
338 type: "WhileStatement";
339 test: Expression;
340 body: Statement;
341}
342
343export interface WithStatement extends Node {
344 type: "WithStatement";
345 object: Expression;
346 body: BlockStatement | Statement;
347}
348
349export interface AssignmentPattern extends Node {
350 type: "AssignmentPattern";
351 left: Identifier;
352 right: Expression;
353}
354
355export interface ArrayPattern extends Node {
356 type: "ArrayPattern";
357 elements: Expression[];
358 typeAnnotation?: TypeAnnotation;
359}
360
361export interface ArrowFunctionExpression extends Node {
362 type: "ArrowFunctionExpression";
363 id: Identifier;
364 params: LVal[];
365 body: BlockStatement | Expression;
366 generator: boolean;
367 async: boolean;
368 expression: boolean;
369 returnType?: TypeAnnotation;
370 typeParameters?: TypeParameterDeclaration;
371}
372
373export interface ClassBody extends Node {
374 type: "ClassBody";
375 body: Array<ClassMethod | ClassProperty>;
376}
377
378export interface ClassDeclaration extends Node {
379 type: "ClassDeclaration";
380 id: Identifier;
381 superClass: Expression;
382 body: ClassBody;
383 decorators?: Decorator[];
384 implements?: ClassImplements[];
385 mixins?: any[];
386 typeParameters?: TypeParameterDeclaration;
387 superTypeParameters?: TypeParameterInstantiation;
388}
389
390export interface ClassExpression extends Node {
391 type: "ClassExpression";
392 id: Identifier;
393 superClass: Expression;
394 body: ClassBody;
395 decorators?: Decorator[];
396 implements?: ClassImplements[];
397 mixins?: any[];
398 typeParameters?: TypeParameterDeclaration;
399 superTypeParameters?: TypeParameterInstantiation;
400}
401
402export interface ExportAllDeclaration extends Node {
403 type: "ExportAllDeclaration";
404 source: StringLiteral;
405}
406
407export interface ExportDefaultDeclaration extends Node {
408 type: "ExportDefaultDeclaration";
409 declaration: Declaration | Expression;
410}
411
412export interface ExportNamedDeclaration extends Node {
413 type: "ExportNamedDeclaration";
414 declaration: Declaration;
415 specifiers: ExportSpecifier[];
416 source: StringLiteral | null;
417}
418
419export interface ExportSpecifier extends Node {
420 type: "ExportSpecifier";
421 local: Identifier;
422 imported: Identifier;
423 exported: Identifier;
424}
425
426export interface ForOfStatement extends Node {
427 type: "ForOfStatement";
428 left: VariableDeclaration | LVal;
429 right: Expression;
430 body: Statement;
431}
432
433export interface ImportDeclaration extends Node {
434 type: "ImportDeclaration";
435 specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
436 source: StringLiteral;
437}
438
439export interface ImportDefaultSpecifier extends Node {
440 type: "ImportDefaultSpecifier";
441 local: Identifier;
442}
443
444export interface ImportNamespaceSpecifier extends Node {
445 type: "ImportNamespaceSpecifier";
446 local: Identifier;
447}
448
449export interface ImportSpecifier extends Node {
450 type: "ImportSpecifier";
451 local: Identifier;
452 imported: Identifier;
453}
454
455export interface MetaProperty extends Node {
456 type: "MetaProperty";
457 meta: Identifier;
458 property: Identifier;
459}
460
461export interface ClassMethod extends Node {
462 type: "ClassMethod";
463 key: Expression;
464 value?: FunctionExpression;
465 kind: "constructor" | "method" | "get" | "set";
466 computed: boolean;
467 static: boolean;
468 decorators?: Decorator[];
469 id: Identifier;
470 params: LVal[];
471 body: BlockStatement;
472 generator: boolean;
473 async: boolean;
474 expression: boolean;
475 returnType?: TypeAnnotation;
476 typeParameters?: TypeParameterDeclaration;
477}
478
479// See: https://github.com/babel/babel/blob/master/doc/ast/spec.md#objectpattern
480export interface AssignmentProperty extends Node {
481 type: "ObjectProperty";
482 key: Expression;
483 computed: boolean;
484 value: Pattern;
485 decorators?: Decorator[];
486 shorthand: boolean;
487}
488
489export interface ObjectPattern extends Node {
490 type: "ObjectPattern";
491 properties: Array<AssignmentProperty | RestProperty>;
492 typeAnnotation?: TypeAnnotation;
493}
494
495export interface SpreadElement extends Node {
496 type: "SpreadElement";
497 argument: Expression;
498}
499
500export interface Super extends Node {
501 type: "Super";
502}
503
504export interface TaggedTemplateExpression extends Node {
505 type: "TaggedTemplateExpression";
506 tag: Expression;
507 quasi: TemplateLiteral;
508}
509
510export interface TemplateElement extends Node {
511 type: "TemplateElement";
512 tail: boolean;
513 value: {
514 cooked: string;
515 raw: string;
516 };
517}
518
519export interface TemplateLiteral extends Node {
520 type: "TemplateLiteral";
521 quasis: TemplateElement[];
522 expressions: Expression[];
523}
524
525export interface YieldExpression extends Node {
526 type: "YieldExpression";
527 argument: Expression;
528 delegate: boolean;
529}
530
531export interface AnyTypeAnnotation extends Node {
532 type: "AnyTypeAnnotation";
533}
534
535export interface ArrayTypeAnnotation extends Node {
536 type: "ArrayTypeAnnotation";
537 elementType: FlowTypeAnnotation;
538}
539
540export interface BooleanTypeAnnotation extends Node {
541 type: "BooleanTypeAnnotation";
542}
543
544export interface BooleanLiteralTypeAnnotation extends Node {
545 type: "BooleanLiteralTypeAnnotation";
546}
547
548export interface NullLiteralTypeAnnotation extends Node {
549 type: "NullLiteralTypeAnnotation";
550}
551
552export interface ClassImplements extends Node {
553 type: "ClassImplements";
554 id: Identifier;
555 typeParameters: TypeParameterInstantiation;
556}
557
558export interface ClassProperty extends Node {
559 type: "ClassProperty";
560 key: Identifier;
561 value: Expression;
562 decorators?: Decorator[];
563 typeAnnotation?: TypeAnnotation;
564}
565
566export interface DeclareClass extends Node {
567 type: "DeclareClass";
568 id: Identifier;
569 typeParameters: TypeParameterDeclaration;
570 extends: InterfaceExtends[];
571 body: ObjectTypeAnnotation;
572}
573
574export interface DeclareFunction extends Node {
575 type: "DeclareFunction";
576 id: Identifier;
577}
578
579export interface DeclareInterface extends Node {
580 type: "DeclareInterface";
581 id: Identifier;
582 typeParameters: TypeParameterDeclaration;
583 extends: InterfaceExtends[];
584 body: ObjectTypeAnnotation;
585}
586
587export interface DeclareModule extends Node {
588 type: "DeclareModule";
589 id: StringLiteral | Identifier;
590 body: BlockStatement;
591}
592
593export interface DeclareTypeAlias extends Node {
594 type: "DeclareTypeAlias";
595 id: Identifier;
596 typeParameters: TypeParameterDeclaration;
597 right: FlowTypeAnnotation;
598}
599
600export interface DeclareVariable extends Node {
601 type: "DeclareVariable";
602 id: Identifier;
603}
604
605export interface ExistentialTypeParam extends Node {
606 type: "ExistentialTypeParam";
607}
608
609export interface FunctionTypeAnnotation extends Node {
610 type: "FunctionTypeAnnotation";
611 typeParameters: TypeParameterDeclaration;
612 params: FunctionTypeParam[];
613 rest: FunctionTypeParam;
614 returnType: FlowTypeAnnotation;
615}
616
617export interface FunctionTypeParam extends Node {
618 type: "FunctionTypeParam";
619 name: Identifier;
620 typeAnnotation: FlowTypeAnnotation;
621}
622
623export interface GenericTypeAnnotation extends Node {
624 type: "GenericTypeAnnotation";
625 id: Identifier;
626 typeParameters: TypeParameterInstantiation;
627}
628
629export interface InterfaceExtends extends Node {
630 type: "InterfaceExtends";
631 id: Identifier;
632 typeParameters: TypeParameterInstantiation;
633}
634
635export interface InterfaceDeclaration extends Node {
636 type: "InterfaceDeclaration";
637 id: Identifier;
638 typeParameters: TypeParameterDeclaration;
639 extends: InterfaceExtends[];
640 mixins?: any[];
641 body: ObjectTypeAnnotation;
642}
643
644export interface IntersectionTypeAnnotation extends Node {
645 type: "IntersectionTypeAnnotation";
646 types: FlowTypeAnnotation[];
647}
648
649export interface MixedTypeAnnotation extends Node {
650 type: "MixedTypeAnnotation";
651}
652
653export interface NullableTypeAnnotation extends Node {
654 type: "NullableTypeAnnotation";
655 typeAnnotation: FlowTypeAnnotation;
656}
657
658export interface NumericLiteralTypeAnnotation extends Node {
659 type: "NumericLiteralTypeAnnotation";
660}
661
662export interface NumberTypeAnnotation extends Node {
663 type: "NumberTypeAnnotation";
664}
665
666export interface StringLiteralTypeAnnotation extends Node {
667 type: "StringLiteralTypeAnnotation";
668}
669
670export interface StringTypeAnnotation extends Node {
671 type: "StringTypeAnnotation";
672}
673
674export interface ThisTypeAnnotation extends Node {
675 type: "ThisTypeAnnotation";
676}
677
678export interface TupleTypeAnnotation extends Node {
679 type: "TupleTypeAnnotation";
680 types: FlowTypeAnnotation[];
681}
682
683export interface TypeofTypeAnnotation extends Node {
684 type: "TypeofTypeAnnotation";
685 argument: FlowTypeAnnotation;
686}
687
688export interface TypeAlias extends Node {
689 type: "TypeAlias";
690 id: Identifier;
691 typeParameters: TypeParameterDeclaration;
692 right: FlowTypeAnnotation;
693}
694
695export interface TypeAnnotation extends Node {
696 type: "TypeAnnotation";
697 typeAnnotation: FlowTypeAnnotation;
698}
699
700export interface TypeCastExpression extends Node {
701 type: "TypeCastExpression";
702 expression: Expression;
703 typeAnnotation: FlowTypeAnnotation;
704}
705
706export interface TypeParameter extends Node {
707 type: "TypeParameterDeclaration";
708 bound: TypeAnnotation | null;
709 default: Flow | null;
710 name: string | null;
711}
712
713export interface TypeParameterDeclaration extends Node {
714 type: "TypeParameterDeclaration";
715 params: Identifier[];
716}
717
718export interface TypeParameterInstantiation extends Node {
719 type: "TypeParameterInstantiation";
720 params: FlowTypeAnnotation[];
721}
722
723export interface ObjectTypeAnnotation extends Node {
724 type: "ObjectTypeAnnotation";
725 properties: ObjectTypeProperty[];
726 indexers: ObjectTypeIndexer[];
727 callProperties: ObjectTypeCallProperty[];
728}
729
730export interface ObjectTypeCallProperty extends Node {
731 type: "ObjectTypeCallProperty";
732 value: FlowTypeAnnotation;
733}
734
735export interface ObjectTypeIndexer extends Node {
736 type: "ObjectTypeIndexer";
737 id: Expression;
738 key: FlowTypeAnnotation;
739 value: FlowTypeAnnotation;
740}
741
742export interface ObjectTypeProperty extends Node {
743 type: "ObjectTypeProperty";
744 key: Expression;
745 value: FlowTypeAnnotation;
746}
747
748export interface QualifiedTypeIdentifier extends Node {
749 type: "QualifiedTypeIdentifier";
750 id: Identifier;
751 qualification: Identifier | QualifiedTypeIdentifier;
752}
753
754export interface UnionTypeAnnotation extends Node {
755 type: "UnionTypeAnnotation";
756 types: FlowTypeAnnotation[];
757}
758
759export interface VoidTypeAnnotation extends Node {
760 type: "VoidTypeAnnotation";
761}
762
763export interface JSXAttribute extends Node {
764 type: "JSXAttribute";
765 name: JSXIdentifier | JSXNamespacedName;
766 value: JSXElement | StringLiteral | JSXExpressionContainer | null;
767}
768
769export interface JSXClosingElement extends Node {
770 type: "JSXClosingElement";
771 name: JSXIdentifier | JSXMemberExpression;
772}
773
774export interface JSXElement extends Node {
775 type: "JSXElement";
776 openingElement: JSXOpeningElement;
777 closingElement: JSXClosingElement;
778 children: Array<JSXElement | JSXExpressionContainer | JSXText>;
779 selfClosing?: boolean;
780}
781
782export interface JSXEmptyExpression extends Node {
783 type: "JSXEmptyExpression";
784}
785
786export interface JSXExpressionContainer extends Node {
787 type: "JSXExpressionContainer";
788 expression: Expression;
789}
790
791export interface JSXIdentifier extends Node {
792 type: "JSXIdentifier";
793 name: string;
794}
795
796export interface JSXMemberExpression extends Node {
797 type: "JSXMemberExpression";
798 object: JSXMemberExpression | JSXIdentifier;
799 property: JSXIdentifier;
800}
801
802export interface JSXNamespacedName extends Node {
803 type: "JSXNamespacedName";
804 namespace: JSXIdentifier;
805 name: JSXIdentifier;
806}
807
808export interface JSXOpeningElement extends Node {
809 type: "JSXOpeningElement";
810 name: JSXIdentifier | JSXMemberExpression;
811 selfClosing: boolean;
812 attributes: JSXAttribute[];
813}
814
815export interface JSXSpreadAttribute extends Node {
816 type: "JSXSpreadAttribute";
817 argument: Expression;
818}
819
820export interface JSXText extends Node {
821 type: "JSXText";
822 value: string;
823}
824
825export interface Noop extends Node {
826 type: "Noop";
827}
828
829export interface ParenthesizedExpression extends Node {
830 type: "ParenthesizedExpression";
831 expression: Expression;
832}
833
834export interface AwaitExpression extends Node {
835 type: "AwaitExpression";
836 argument: Expression;
837}
838
839export interface BindExpression extends Node {
840 type: "BindExpression";
841 object: Expression;
842 callee: Expression;
843}
844
845export interface Decorator extends Node {
846 type: "Decorator";
847 expression: Expression;
848}
849
850export interface DoExpression extends Node {
851 type: "DoExpression";
852 body: BlockStatement;
853}
854
855export interface ExportDefaultSpecifier extends Node {
856 type: "ExportDefaultSpecifier";
857 exported: Identifier;
858}
859
860export interface ExportNamespaceSpecifier extends Node {
861 type: "ExportNamespaceSpecifier";
862 exported: Identifier;
863}
864
865export interface RestProperty extends Node {
866 type: "RestProperty";
867 argument: LVal;
868}
869
870export interface SpreadProperty extends Node {
871 type: "SpreadProperty";
872 argument: Expression;
873}
874
875export interface TSAnyKeyword extends Node {
876 type: "TSAnyKeyword";
877}
878
879export interface TSArrayType extends Node {
880 type: "TSArrayType";
881 elementType: TSType;
882}
883
884export interface TSAsExpression extends Node {
885 type: "TSAsExpression";
886 expression: Expression;
887 typeAnnotation: TSType;
888}
889
890export interface TSBooleanKeyword extends Node {
891 type: "TSBooleanKeyword";
892}
893
894export interface TSCallSignatureDeclaration extends Node {
895 type: "TSCallSignatureDeclaration";
896 typeParameters: TypeParameterDeclaration | null;
897 parameters: Array<Identifier | RestElement> | null;
898 typeAnnotation: TSTypeAnnotation | null;
899}
900
901export interface TSConstructSignatureDeclaration extends Node {
902 type: "TSConstructSignatureDeclaration";
903 typeParameters: TypeParameterDeclaration | null;
904 parameters: Array<Identifier | RestElement> | null;
905 typeAnnotation: TSTypeAnnotation | null;
906}
907
908export interface TSConstructorType extends Node {
909 type: "TSConstructorType";
910 typeParameters: TypeParameterDeclaration | null;
911 typeAnnotation: TSTypeAnnotation | null;
912 parameters: Array<Identifier | RestElement> | null;
913}
914
915export interface TSDeclareFunction extends Node {
916 type: "TSDeclareFunction";
917 id: Identifier | null;
918 typeParameters: TypeParameterDeclaration | Noop | null;
919 params: LVal[];
920 returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
921 async: boolean;
922 declare: boolean | null;
923 generator: boolean;
924}
925
926export interface TSDeclareMethod extends Node {
927 type: "TSDeclareMethod";
928 decorators: Decorator[] | null;
929 key: Expression;
930 typeParameters: TypeParameterDeclaration | Noop | null;
931 params: LVal[];
932 returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
933 abstract: boolean | null;
934 access: "public" | "private" | "protected" | null;
935 accessibility: "public" | "private" | "protected" | null;
936 async: boolean;
937 computed: boolean;
938 generator: boolean;
939 kind: "get" | "set" | "method" | "constructor";
940 optional: boolean | null;
941 static: boolean | null;
942}
943
944export interface TSEnumDeclaration extends Node {
945 type: "TSEnumDeclaration";
946 id: Identifier;
947 members: TSEnumMember[];
948 const: boolean | null;
949 declare: boolean | null;
950 initializer: Expression | null;
951}
952
953export interface TSEnumMember extends Node {
954 type: "TSEnumMember";
955 id: Identifier | StringLiteral;
956 initializer: Expression | null;
957}
958
959export interface TSExportAssignment extends Node {
960 type: "TSExportAssignment";
961 expression: Expression;
962}
963
964export interface TSExpressionWithTypeArguments extends Node {
965 type: "TSExpressionWithTypeArguments";
966 expression: TSEntityName;
967 typeParameters: TypeParameterInstantiation | null;
968}
969
970export interface TSExternalModuleReference extends Node {
971 type: "TSExternalModuleReference";
972 expression: StringLiteral;
973}
974
975export interface TSFunctionType extends Node {
976 type: "TSFunctionType";
977 typeParameters: TypeParameterDeclaration | null;
978 typeAnnotation: TSTypeAnnotation | null;
979 parameters: Array<Identifier | RestElement> | null;
980}
981
982export interface TSImportEqualsDeclaration extends Node {
983 type: "TSImportEqualsDeclaration";
984 id: Identifier;
985 moduleReference: TSEntityName | TSExternalModuleReference;
986 isExport: boolean | null;
987}
988
989export interface TSIndexSignature extends Node {
990 type: "TSIndexSignature";
991 parameters: Identifier[];
992 typeAnnotation: TSTypeAnnotation | null;
993 readonly: boolean | null;
994}
995
996export interface TSIndexedAccessType extends Node {
997 type: "TSIndexedAccessType";
998 objectType: TSType;
999 indexType: TSType;
1000}
1001
1002export interface TSInterfaceBody extends Node {
1003 type: "TSInterfaceBody";
1004 body: TSTypeElement[];
1005}
1006
1007export interface TSInterfaceDeclaration extends Node {
1008 type: "TSInterfaceDeclaration";
1009 id: Identifier;
1010 typeParameters: TypeParameterDeclaration | null;
1011 extends: TSExpressionWithTypeArguments[] | null;
1012 body: TSInterfaceBody;
1013 declare: boolean | null;
1014}
1015
1016export interface TSIntersectionType extends Node {
1017 type: "TSIntersectionType";
1018 types: TSType[];
1019}
1020
1021export interface TSLiteralType extends Node {
1022 type: "TSLiteralType";
1023 literal: NumericLiteral | StringLiteral | BooleanLiteral;
1024}
1025
1026export interface TSMappedType extends Node {
1027 type: "TSMappedType";
1028 typeParameter: TypeParameter;
1029 typeAnnotation: TSType | null;
1030 optional: boolean | null;
1031 readonly: boolean | null;
1032}
1033
1034export interface TSMethodSignature extends Node {
1035 type: "TSMethodSignature";
1036 key: Expression;
1037 typeParameters: TypeParameterDeclaration | null;
1038 parameters: Array<Identifier | RestElement> | null;
1039 typeAnnotation: TSTypeAnnotation | null;
1040 computed: boolean | null;
1041 optional: boolean | null;
1042}
1043
1044export interface TSModuleBlock extends Node {
1045 type: "TSModuleBlock";
1046 body: Statement[];
1047}
1048
1049export interface TSModuleDeclaration extends Node {
1050 type: "TSModuleDeclaration";
1051 id: Identifier | StringLiteral;
1052 body: TSModuleBlock | TSModuleDeclaration;
1053 declare: boolean | null;
1054 global: boolean | null;
1055}
1056
1057export interface TSNamespaceExportDeclaration extends Node {
1058 type: "TSNamespaceExportDeclaration";
1059 id: Identifier;
1060}
1061
1062export interface TSNeverKeyword extends Node {
1063 type: "TSNeverKeyword";
1064}
1065
1066export interface TSNonNullExpression extends Node {
1067 type: "TSNonNullExpression";
1068 expression: Expression;
1069}
1070
1071export interface TSNullKeyword extends Node {
1072 type: "TSNullKeyword";
1073}
1074
1075export interface TSNumberKeyword extends Node {
1076 type: "TSNumberKeyword";
1077}
1078
1079export interface TSObjectKeyword extends Node {
1080 type: "TSObjectKeyword";
1081}
1082
1083export interface TSParameterProperty extends Node {
1084 type: "TSParameterProperty";
1085 parameter: Identifier | AssignmentPattern;
1086 accessibility: 'public' | 'private' | 'protected' | null;
1087 readonly: boolean | null;
1088}
1089
1090export interface TSParenthesizedType extends Node {
1091 type: "TSParenthesizedType";
1092 typeAnnotation: TSType;
1093}
1094
1095export interface TSPropertySignature extends Node {
1096 type: "TSPropertySignature";
1097 key: Expression;
1098 typeAnnotation: TSTypeAnnotation | null;
1099 initializer: Expression | null;
1100 computed: boolean | null;
1101 optional: boolean | null;
1102 readonly: boolean | null;
1103}
1104
1105export interface TSQualifiedName extends Node {
1106 type: "TSQualifiedName";
1107 left: TSEntityName;
1108 right: Identifier;
1109}
1110
1111export interface TSStringKeyword extends Node {
1112 type: "TSStringKeyword";
1113}
1114
1115export interface TSSymbolKeyword extends Node {
1116 type: "TSSymbolKeyword";
1117}
1118
1119export interface TSThisType extends Node {
1120 type: "TSThisType";
1121}
1122
1123export interface TSTupleType extends Node {
1124 type: "TSTupleType";
1125 elementTypes: TSType[];
1126}
1127
1128export interface TSTypeAliasDeclaration extends Node {
1129 type: "TSTypeAliasDeclaration";
1130 id: Identifier;
1131 typeParameters: TypeParameterDeclaration | null;
1132 typeAnnotation: TSType;
1133 declare: boolean | null;
1134}
1135
1136export interface TSTypeAnnotation extends Node {
1137 type: "TSTypeAnnotation";
1138 typeAnnotation: TSType;
1139}
1140
1141export interface TSTypeAssertion extends Node {
1142 type: "TSTypeAssertion";
1143 typeAnnotation: TSType;
1144 expression: Expression;
1145}
1146
1147export interface TSTypeLiteral extends Node {
1148 type: "TSTypeLiteral";
1149 members: TSTypeElement[];
1150}
1151
1152export interface TSTypeOperator extends Node {
1153 type: "TSTypeOperator";
1154 typeAnnotation: TSType;
1155 operator: string | null;
1156}
1157
1158export interface TSTypeParameter extends Node {
1159 type: "TSTypeParameter";
1160 constraint: TSType | null;
1161 default: TSType | null;
1162 name: string | null;
1163}
1164
1165export interface TSTypeParameterDeclaration extends Node {
1166 type: "TSTypeParameterDeclaration";
1167 params: TSTypeParameter[];
1168}
1169
1170export interface TSTypeParameterInstantiation extends Node {
1171 type: "TSTypeParameterInstantiation";
1172 params: TSType[];
1173}
1174
1175export interface TSTypePredicate extends Node {
1176 type: "TSTypePredicate";
1177 parameterName: Identifier | TSThisType;
1178 typeAnnotation: TSTypeAnnotation;
1179}
1180
1181export interface TSTypeQuery extends Node {
1182 type: "TSTypeQuery";
1183 exprName: TSEntityName;
1184}
1185
1186export interface TSTypeReference extends Node {
1187 type: "TSTypeReference";
1188 typeName: TSEntityName;
1189 typeParameters: TypeParameterInstantiation | null;
1190}
1191
1192export interface TSUndefinedKeyword extends Node {
1193 type: "TSUndefinedKeyword";
1194}
1195
1196export interface TSUnionType extends Node {
1197 type: "TSUnionType";
1198 types: TSType[];
1199}
1200
1201export interface TSVoidKeyword extends Node {
1202 type: "TSVoidKeyword";
1203}
1204
1205export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression
1206 | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | BooleanLiteral
1207 | NullLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression
1208 | SequenceExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression
1209 | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression
1210 | TypeCastExpression | JSXElement | JSXEmptyExpression | JSXIdentifier | JSXMemberExpression
1211 | ParenthesizedExpression | AwaitExpression | BindExpression | DoExpression | TSAsExpression
1212 | TSNonNullExpression | TSTypeAssertion;
1213
1214export type Binary = BinaryExpression | LogicalExpression;
1215
1216export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement
1217 | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement
1218 | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod;
1219
1220export type BlockParent = BlockStatement | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration
1221 | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression
1222 | ForOfStatement | ClassMethod;
1223
1224export type Block = BlockStatement | Program;
1225
1226export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement
1227 | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement
1228 | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration
1229 | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration
1230 | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface
1231 | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias | TSDeclareFunction
1232 | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration
1233 | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration;
1234
1235export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression;
1236export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement;
1237export type Conditional = ConditionalExpression | IfStatement;
1238export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement;
1239export type While = DoWhileStatement | WhileStatement;
1240export type ExpressionWrapper = ExpressionStatement | TypeCastExpression | ParenthesizedExpression;
1241export type For = ForInStatement | ForStatement | ForOfStatement;
1242export type ForXStatement = ForInStatement | ForOfStatement;
1243export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod;
1244export type FunctionParent = FunctionDeclaration | FunctionExpression | Program | ObjectMethod | ArrowFunctionExpression | ClassMethod;
1245export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression;
1246
1247export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration
1248 | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction
1249 | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias
1250 | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration;
1251
1252export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern
1253 | TSParameterProperty;
1254export type Literal = StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | RegExpLiteral | TemplateLiteral;
1255export type Immutable = StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXOpeningElement;
1256export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty;
1257export type Method = ObjectMethod | ClassMethod;
1258export type ObjectMember = ObjectMethod | ObjectProperty;
1259export type Property = ObjectProperty | ClassProperty;
1260export type UnaryLike = UnaryExpression | SpreadElement | RestProperty | SpreadProperty;
1261export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
1262export type Class = ClassDeclaration | ClassExpression;
1263export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
1264export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
1265export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier;
1266
1267export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation
1268 | ClassImplements | ClassProperty | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule
1269 | DeclareTypeAlias | DeclareVariable | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam
1270 | GenericTypeAnnotation | InterfaceExtends | InterfaceDeclaration | IntersectionTypeAnnotation
1271 | MixedTypeAnnotation | NullableTypeAnnotation | NumericLiteralTypeAnnotation | NumberTypeAnnotation
1272 | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation
1273 | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameterDeclaration
1274 | TypeParameterInstantiation | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer
1275 | ObjectTypeProperty | QualifiedTypeIdentifier | UnionTypeAnnotation | VoidTypeAnnotation;
1276
1277export type FlowTypeAnnotation = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation
1278 | BooleanLiteralTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | IntersectionTypeAnnotation
1279 | MixedTypeAnnotation | NullableTypeAnnotation | NumericLiteralTypeAnnotation | NumberTypeAnnotation
1280 | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation
1281 | TypeofTypeAnnotation | TypeAnnotation | ObjectTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation;
1282
1283export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | MixedTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation;
1284export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias;
1285
1286export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer
1287 | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText;
1288
1289export type TSType = TSAnyKeyword | TSArrayType | TSBooleanKeyword | TSConstructorType | TSExpressionWithTypeArguments
1290 | TSFunctionType | TSIndexedAccessType | TSIntersectionType | TSLiteralType | TSMappedType | TSNeverKeyword
1291 | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSParenthesizedType | TSStringKeyword | TSSymbolKeyword
1292 | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference
1293 | TSUndefinedKeyword | TSUnionType | TSVoidKeyword;
1294
1295export type TSEntityName = Identifier | TSQualifiedName;
1296
1297export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature
1298 | TSMethodSignature | TSPropertySignature;
1299
1300export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
1301export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression;
1302export function binaryExpression(
1303 operator?: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=",
1304 left?: Expression,
1305 right?: Expression
1306): BinaryExpression;
1307export function directive(value?: DirectiveLiteral): Directive;
1308export function directiveLiteral(value?: string): DirectiveLiteral;
1309export function blockStatement(body?: Statement[], directives?: Directive[]): BlockStatement;
1310export function breakStatement(label?: Identifier): BreakStatement;
1311export function callExpression(callee?: Expression, _arguments?: Array<Expression | SpreadElement>): CallExpression;
1312export function catchClause(param?: Identifier, body?: BlockStatement): CatchClause;
1313export function conditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression;
1314export function continueStatement(label?: Identifier): ContinueStatement;
1315export function debuggerStatement(): DebuggerStatement;
1316export function doWhileStatement(test?: Expression, body?: Statement): DoWhileStatement;
1317export function emptyStatement(): EmptyStatement;
1318export function expressionStatement(expression?: Expression): ExpressionStatement;
1319export function file(program?: Program, comments?: Comment[], tokens?: any[]): File;
1320export function forInStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForInStatement;
1321export function forStatement(init?: VariableDeclaration | Expression, test?: Expression, update?: Expression, body?: Statement): ForStatement;
1322export function functionDeclaration(id?: Identifier, params?: LVal[], body?: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration;
1323export function functionExpression(id?: Identifier, params?: LVal[], body?: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression;
1324export function identifier(name?: string): Identifier;
1325export function ifStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement;
1326export function labeledStatement(label?: Identifier, body?: Statement): LabeledStatement;
1327export function stringLiteral(value?: string): StringLiteral;
1328export function numericLiteral(value?: number): NumericLiteral;
1329export function nullLiteral(): NullLiteral;
1330export function booleanLiteral(value?: boolean): BooleanLiteral;
1331export function regExpLiteral(pattern?: string, flags?: string): RegExpLiteral;
1332export function logicalExpression(operator?: "||" | "&&", left?: Expression, right?: Expression): LogicalExpression;
1333export function memberExpression(object?: Expression | Super, property?: Expression, computed?: boolean): MemberExpression;
1334export function newExpression(callee?: Expression | Super, _arguments?: Array<Expression | SpreadElement>): NewExpression;
1335export function program(body?: Array<Statement | ModuleDeclaration>, directives?: Directive[]): Program;
1336export function objectExpression(properties?: Array<ObjectProperty | ObjectMethod | SpreadProperty>): ObjectExpression;
1337export function objectMethod(kind?: "get" | "set" | "method", key?: Expression, params?: LVal[], body?: BlockStatement, computed?: boolean): ObjectMethod;
1338export function objectProperty(key?: Expression, value?: Expression, computed?: boolean, shorthand?: boolean, decorators?: Decorator[]): ObjectProperty;
1339export function restElement(argument?: LVal, typeAnnotation?: TypeAnnotation): RestElement;
1340export function returnStatement(argument?: Expression): ReturnStatement;
1341export function sequenceExpression(expressions?: Expression[]): SequenceExpression;
1342export function switchCase(test?: Expression, consequent?: Statement[]): SwitchCase;
1343export function switchStatement(discriminant?: Expression, cases?: SwitchCase[]): SwitchStatement;
1344export function thisExpression(): ThisExpression;
1345export function throwStatement(argument?: Expression): ThrowStatement;
1346export function tryStatement(block?: BlockStatement, handler?: CatchClause, finalizer?: BlockStatement): TryStatement;
1347export function unaryExpression(operator?: "void" | "delete" | "!" | "+" | "-" | "++" | "--" | "~" | "typeof", argument?: Expression, prefix?: boolean): UnaryExpression;
1348export function updateExpression(operator?: "++" | "--", argument?: Expression, prefix?: boolean): UpdateExpression;
1349export function variableDeclaration(kind?: "var" | "let" | "const", declarations?: VariableDeclarator[]): VariableDeclaration;
1350export function variableDeclarator(id?: LVal, init?: Expression): VariableDeclarator;
1351export function whileStatement(test?: Expression, body?: BlockStatement | Statement): WhileStatement;
1352export function withStatement(object?: Expression, body?: BlockStatement | Statement): WithStatement;
1353export function assignmentPattern(left?: Identifier, right?: Expression): AssignmentPattern;
1354export function arrayPattern(elements?: Expression[], typeAnnotation?: TypeAnnotation): ArrayPattern;
1355export function arrowFunctionExpression(params?: LVal[], body?: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
1356export function classBody(body?: Array<ClassMethod | ClassProperty>): ClassBody;
1357export function classDeclaration(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassDeclaration;
1358export function classExpression(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassExpression;
1359export function exportAllDeclaration(source?: StringLiteral): ExportAllDeclaration;
1360export function exportDefaultDeclaration(declaration?: FunctionDeclaration | ClassDeclaration | Expression): ExportDefaultDeclaration;
1361export function exportNamedDeclaration(declaration?: Declaration, specifiers?: ExportSpecifier[], source?: StringLiteral): ExportNamedDeclaration;
1362export function exportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier;
1363export function forOfStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForOfStatement;
1364export function importDeclaration(specifiers?: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source?: StringLiteral): ImportDeclaration;
1365export function importDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier;
1366export function importNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier;
1367export function importSpecifier(local?: Identifier, imported?: Identifier): ImportSpecifier;
1368export function metaProperty(meta?: string, property?: string): MetaProperty;
1369export function classMethod(kind?: "constructor" | "method" | "get" | "set", key?: Expression, params?: LVal[], body?: BlockStatement, computed?: boolean, _static?: boolean): ClassMethod;
1370export function objectPattern(properties?: Array<AssignmentProperty | RestProperty>, typeAnnotation?: TypeAnnotation): ObjectPattern;
1371export function spreadElement(argument?: Expression): SpreadElement;
1372export function taggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral): TaggedTemplateExpression;
1373export function templateElement(value?: { cooked?: string; raw?: string; }, tail?: boolean): TemplateElement;
1374export function templateLiteral(quasis?: TemplateElement[], expressions?: Expression[]): TemplateLiteral;
1375export function yieldExpression(argument?: Expression, delegate?: boolean): YieldExpression;
1376export function anyTypeAnnotation(): AnyTypeAnnotation;
1377export function arrayTypeAnnotation(elementType?: FlowTypeAnnotation): ArrayTypeAnnotation;
1378export function booleanTypeAnnotation(): BooleanTypeAnnotation;
1379export function booleanLiteralTypeAnnotation(): BooleanLiteralTypeAnnotation;
1380export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation;
1381export function classImplements(id?: Identifier, typeParameters?: TypeParameterInstantiation): ClassImplements;
1382export function classProperty(key?: Identifier, value?: Expression, typeAnnotation?: TypeAnnotation, decorators?: Decorator[]): ClassProperty;
1383export function declareClass(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): DeclareClass;
1384export function declareFunction(id?: Identifier): DeclareFunction;
1385export function declareInterface(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): DeclareInterface;
1386export function declareModule(id?: StringLiteral | Identifier, body?: BlockStatement): DeclareModule;
1387export function declareTypeAlias(id?: Identifier, typeParameters?: TypeParameterDeclaration, right?: FlowTypeAnnotation): DeclareTypeAlias;
1388export function declareVariable(id?: Identifier): DeclareVariable;
1389export function existentialTypeParam(): ExistentialTypeParam;
1390export function functionTypeAnnotation(typeParameters?: TypeParameterDeclaration, params?: FunctionTypeParam[], rest?: FunctionTypeParam, returnType?: FlowTypeAnnotation): FunctionTypeAnnotation;
1391export function functionTypeParam(name?: Identifier, typeAnnotation?: FlowTypeAnnotation): FunctionTypeParam;
1392export function genericTypeAnnotation(id?: Identifier, typeParameters?: TypeParameterInstantiation): GenericTypeAnnotation;
1393export function interfaceExtends(id?: Identifier, typeParameters?: TypeParameterInstantiation): InterfaceExtends;
1394export function interfaceDeclaration(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): InterfaceDeclaration;
1395export function intersectionTypeAnnotation(types?: FlowTypeAnnotation[]): IntersectionTypeAnnotation;
1396export function mixedTypeAnnotation(): MixedTypeAnnotation;
1397export function nullableTypeAnnotation(typeAnnotation?: FlowTypeAnnotation): NullableTypeAnnotation;
1398export function numericLiteralTypeAnnotation(): NumericLiteralTypeAnnotation;
1399export function numberTypeAnnotation(): NumberTypeAnnotation;
1400export function stringLiteralTypeAnnotation(): StringLiteralTypeAnnotation;
1401export function stringTypeAnnotation(): StringTypeAnnotation;
1402export function thisTypeAnnotation(): ThisTypeAnnotation;
1403export function tupleTypeAnnotation(types?: FlowTypeAnnotation[]): TupleTypeAnnotation;
1404export function typeofTypeAnnotation(argument?: FlowTypeAnnotation): TypeofTypeAnnotation;
1405export function typeAlias(id?: Identifier, typeParameters?: TypeParameterDeclaration, right?: FlowTypeAnnotation): TypeAlias;
1406export function typeAnnotation(typeAnnotation?: FlowTypeAnnotation): TypeAnnotation;
1407export function typeCastExpression(expression?: Expression, typeAnnotation?: FlowTypeAnnotation): TypeCastExpression;
1408export function typeParameter(bound?: TypeAnnotation, default_?: Flow): TypeParameter;
1409export function typeParameterDeclaration(params?: Identifier[]): TypeParameterDeclaration;
1410export function typeParameterInstantiation(params?: FlowTypeAnnotation[]): TypeParameterInstantiation;
1411export function objectTypeAnnotation(properties?: ObjectTypeProperty[], indexers?: ObjectTypeIndexer[], callProperties?: ObjectTypeCallProperty[]): ObjectTypeAnnotation;
1412export function objectTypeCallProperty(value?: FlowTypeAnnotation): ObjectTypeCallProperty;
1413export function objectTypeIndexer(id?: Expression, key?: FlowTypeAnnotation, value?: FlowTypeAnnotation): ObjectTypeIndexer;
1414export function objectTypeProperty(key?: Expression, value?: FlowTypeAnnotation): ObjectTypeProperty;
1415export function qualifiedTypeIdentifier(id?: Identifier, qualification?: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
1416export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnnotation;
1417export function voidTypeAnnotation(): VoidTypeAnnotation;
1418export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
1419export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
1420export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array<JSXElement | JSXExpressionContainer | JSXText>, selfClosing?: boolean): JSXElement;
1421export function jSXEmptyExpression(): JSXEmptyExpression;
1422export function jSXExpressionContainer(expression?: Expression): JSXExpressionContainer;
1423export function jSXIdentifier(name?: string): JSXIdentifier;
1424export function jSXMemberExpression(object?: JSXMemberExpression | JSXIdentifier, property?: JSXIdentifier): JSXMemberExpression;
1425export function jSXNamespacedName(namespace?: JSXIdentifier, name?: JSXIdentifier): JSXNamespacedName;
1426export function jSXOpeningElement(name?: JSXIdentifier | JSXMemberExpression, attributes?: JSXAttribute[], selfClosing?: boolean): JSXOpeningElement;
1427export function jSXSpreadAttribute(argument?: Expression): JSXSpreadAttribute;
1428export function jSXText(value?: string): JSXText;
1429export function noop(): Noop;
1430export function parenthesizedExpression(expression?: Expression): ParenthesizedExpression;
1431export function awaitExpression(argument?: Expression): AwaitExpression;
1432export function bindExpression(object?: Expression, callee?: Expression): BindExpression;
1433export function decorator(expression?: Expression): Decorator;
1434export function doExpression(body?: BlockStatement): DoExpression;
1435export function exportDefaultSpecifier(exported?: Identifier): ExportDefaultSpecifier;
1436export function exportNamespaceSpecifier(exported?: Identifier): ExportNamespaceSpecifier;
1437export function restProperty(argument?: LVal): RestProperty;
1438export function spreadProperty(argument?: Expression): SpreadProperty;
1439
1440export function TSAnyKeyword(): TSAnyKeyword;
1441export function TSArrayType(elementType: TSType): TSArrayType;
1442export function TSAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
1443export function TSBooleanKeyword(): TSBooleanKeyword;
1444export function TSCallSignatureDeclaration(typeParameters?: TypeParameterDeclaration, parameters?: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation): TSCallSignatureDeclaration;
1445export function TSConstructSignatureDeclaration(typeParameters?: TypeParameterDeclaration, parameters?: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation): TSTypeElement;
1446export function TSConstructorType(typeParameters?: TypeParameterDeclaration, typeAnnotation?: TSTypeAnnotation): TSConstructorType;
1447export function TSDeclareFunction(
1448 id: Identifier | undefined | null,
1449 typeParameters: TypeParameterDeclaration | Noop | undefined | null,
1450 params: LVal[],
1451 returnType: TypeAnnotation | TSTypeAnnotation | Noop | undefined | null): TSDeclareFunction;
1452export function TSDeclareMethod(
1453 decorators: Decorator[] | undefined | null,
1454 key: Expression,
1455 typeParameters: TypeParameterDeclaration | Noop | undefined | null,
1456 params: LVal[],
1457 returnType?: TypeAnnotation | TSTypeAnnotation | Noop): TSDeclareMethod;
1458export function TSEnumDeclaration(id: Identifier, members: TSEnumMember[]): TSEnumDeclaration;
1459export function TSEnumMember(id: Identifier | StringLiteral, initializer?: Expression): TSEnumMember;
1460export function TSExportAssignment(expression: Expression): TSExportAssignment;
1461export function TSExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TypeParameterInstantiation): TSExpressionWithTypeArguments;
1462export function TSExternalModuleReference(expression: StringLiteral): TSExternalModuleReference;
1463export function TSFunctionType(typeParameters?: TypeParameterDeclaration, typeAnnotation?: TSTypeAnnotation): TSFunctionType;
1464export function TSImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration;
1465export function TSIndexSignature(parameters: Identifier[], typeAnnotation?: TSTypeAnnotation): TSIndexSignature;
1466export function TSIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
1467export function TSInterfaceBody(body: TSTypeElement[]): TSInterfaceBody;
1468export function TSInterfaceDeclaration(
1469 id: Identifier,
1470 typeParameters: TypeParameterDeclaration | undefined | null,
1471 extends_: TSExpressionWithTypeArguments[] | undefined | null,
1472 body: TSInterfaceBody): TSInterfaceDeclaration;
1473export function TSIntersectionType(types: TSType[]): TSIntersectionType;
1474export function TSLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType;
1475export function TSMappedType(typeParameter: TypeParameter, typeAnnotation?: TSType): TSMappedType;
1476export function TSMethodSignature(key: Expression, typeParameters?: TypeParameterDeclaration, parameters?: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation): TSMethodSignature;
1477export function TSModuleBlock(body: Statement[]): TSModuleBlock;
1478export function TSModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration;
1479export function TSNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration;
1480export function TSNeverKeyword(): TSNeverKeyword;
1481export function TSNonNullExpression(expression: Expression): TSNonNullExpression;
1482export function TSNullKeyword(): TSNullKeyword;
1483export function TSNumberKeyword(): TSNumberKeyword;
1484export function TSObjectKeyword(): TSObjectKeyword;
1485export function TSParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
1486export function TSParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
1487export function TSPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation, initializer?: Expression): TSPropertySignature;
1488export function TSQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
1489export function TSStringKeyword(): TSStringKeyword;
1490export function TSSymbolKeyword(): TSSymbolKeyword;
1491export function TSThisType(): TSThisType;
1492export function TSTupleType(elementTypes: TSType[]): TSTupleType;
1493export function TSTypeAliasDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | undefined | null, typeAnnotation: TSType): TSTypeAliasDeclaration;
1494export function TSTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
1495export function TSTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
1496export function TSTypeLiteral(members: TSTypeElement[]): TSTypeLiteral;
1497export function TSTypeOperator(typeAnnotation: TSType): TSTypeOperator;
1498export function TSTypeParameter(constraint?: TSType, default_?: TSType): TSTypeParameter;
1499export function TSTypeParameterDeclaration(params: TSTypeParameter[]): TSTypeParameterDeclaration;
1500export function TSTypeParameterInstantiation(params: TSType[]): TSTypeParameterInstantiation;
1501export function TSTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation: TSTypeAnnotation): TSTypePredicate;
1502export function TSTypeQuery(exprName: TSEntityName): TSTypeQuery;
1503export function TSTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation): TSTypeReference;
1504export function TSUndefinedKeyword(): TSUndefinedKeyword;
1505export function TSUnionType(types: TSType[]): TSUnionType;
1506export function TSVoidKeyword(): TSVoidKeyword;
1507
1508export function isArrayExpression(node: object | null | undefined, opts?: object): node is ArrayExpression;
1509export function isAssignmentExpression(node: object | null | undefined, opts?: object): node is AssignmentExpression;
1510export function isBinaryExpression(node: object | null | undefined, opts?: object): node is BinaryExpression;
1511export function isDirective(node: object | null | undefined, opts?: object): node is Directive;
1512export function isDirectiveLiteral(node: object | null | undefined, opts?: object): node is DirectiveLiteral;
1513export function isBlockStatement(node: object | null | undefined, opts?: object): node is BlockStatement;
1514export function isBreakStatement(node: object | null | undefined, opts?: object): node is BreakStatement;
1515export function isCallExpression(node: object | null | undefined, opts?: object): node is CallExpression;
1516export function isCatchClause(node: object | null | undefined, opts?: object): node is CatchClause;
1517export function isConditionalExpression(node: object | null | undefined, opts?: object): node is ConditionalExpression;
1518export function isContinueStatement(node: object | null | undefined, opts?: object): node is ContinueStatement;
1519export function isDebuggerStatement(node: object | null | undefined, opts?: object): node is DebuggerStatement;
1520export function isDoWhileStatement(node: object | null | undefined, opts?: object): node is DoWhileStatement;
1521export function isEmptyStatement(node: object | null | undefined, opts?: object): node is EmptyStatement;
1522export function isExpressionStatement(node: object | null | undefined, opts?: object): node is ExpressionStatement;
1523export function isFile(node: object | null | undefined, opts?: object): node is File;
1524export function isForInStatement(node: object | null | undefined, opts?: object): node is ForInStatement;
1525export function isForStatement(node: object | null | undefined, opts?: object): node is ForStatement;
1526export function isFunctionDeclaration(node: object | null | undefined, opts?: object): node is FunctionDeclaration;
1527export function isFunctionExpression(node: object | null | undefined, opts?: object): node is FunctionExpression;
1528export function isIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
1529export function isIfStatement(node: object | null | undefined, opts?: object): node is IfStatement;
1530export function isLabeledStatement(node: object | null | undefined, opts?: object): node is LabeledStatement;
1531export function isStringLiteral(node: object | null | undefined, opts?: object): node is StringLiteral;
1532export function isNumericLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
1533
1534/** @deprecated Use `isNumericLiteral` */
1535export function isNumberLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
1536export function isNullLiteral(node: object | null | undefined, opts?: object): node is NullLiteral;
1537export function isBooleanLiteral(node: object | null | undefined, opts?: object): node is BooleanLiteral;
1538export function isRegExpLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
1539
1540/** @deprecated Use `isRegExpLiteral` */
1541export function isRegexLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
1542export function isLogicalExpression(node: object | null | undefined, opts?: object): node is LogicalExpression;
1543export function isMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
1544export function isNewExpression(node: object | null | undefined, opts?: object): node is NewExpression;
1545export function isProgram(node: object | null | undefined, opts?: object): node is Program;
1546export function isObjectExpression(node: object | null | undefined, opts?: object): node is ObjectExpression;
1547export function isObjectMethod(node: object | null | undefined, opts?: object): node is ObjectMethod;
1548export function isObjectProperty(node: object | null | undefined, opts?: object): node is ObjectProperty;
1549export function isRestElement(node: object | null | undefined, opts?: object): node is RestElement;
1550export function isReturnStatement(node: object | null | undefined, opts?: object): node is ReturnStatement;
1551export function isSequenceExpression(node: object | null | undefined, opts?: object): node is SequenceExpression;
1552export function isSwitchCase(node: object | null | undefined, opts?: object): node is SwitchCase;
1553export function isSwitchStatement(node: object | null | undefined, opts?: object): node is SwitchStatement;
1554export function isThisExpression(node: object | null | undefined, opts?: object): node is ThisExpression;
1555export function isThrowStatement(node: object | null | undefined, opts?: object): node is ThrowStatement;
1556export function isTryStatement(node: object | null | undefined, opts?: object): node is TryStatement;
1557export function isUnaryExpression(node: object | null | undefined, opts?: object): node is UnaryExpression;
1558export function isUpdateExpression(node: object | null | undefined, opts?: object): node is UpdateExpression;
1559export function isVariableDeclaration(node: object | null | undefined, opts?: object): node is VariableDeclaration;
1560export function isVariableDeclarator(node: object | null | undefined, opts?: object): node is VariableDeclarator;
1561export function isWhileStatement(node: object | null | undefined, opts?: object): node is WhileStatement;
1562export function isWithStatement(node: object | null | undefined, opts?: object): node is WithStatement;
1563export function isAssignmentPattern(node: object | null | undefined, opts?: object): node is AssignmentPattern;
1564export function isArrayPattern(node: object | null | undefined, opts?: object): node is ArrayPattern;
1565export function isArrowFunctionExpression(node: object | null | undefined, opts?: object): node is ArrowFunctionExpression;
1566export function isClassBody(node: object | null | undefined, opts?: object): node is ClassBody;
1567export function isClassDeclaration(node: object | null | undefined, opts?: object): node is ClassDeclaration;
1568export function isClassExpression(node: object | null | undefined, opts?: object): node is ClassExpression;
1569export function isExportAllDeclaration(node: object | null | undefined, opts?: object): node is ExportAllDeclaration;
1570export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object): node is ExportDefaultDeclaration;
1571export function isExportNamedDeclaration(node: object | null | undefined, opts?: object): node is ExportNamedDeclaration;
1572export function isExportSpecifier(node: object | null | undefined, opts?: object): node is ExportSpecifier;
1573export function isForOfStatement(node: object | null | undefined, opts?: object): node is ForOfStatement;
1574export function isImportDeclaration(node: object | null | undefined, opts?: object): node is ImportDeclaration;
1575export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ImportDefaultSpecifier;
1576export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ImportNamespaceSpecifier;
1577export function isImportSpecifier(node: object | null | undefined, opts?: object): node is ImportSpecifier;
1578export function isMetaProperty(node: object | null | undefined, opts?: object): node is MetaProperty;
1579export function isClassMethod(node: object | null | undefined, opts?: object): node is ClassMethod;
1580export function isObjectPattern(node: object | null | undefined, opts?: object): node is ObjectPattern;
1581export function isSpreadElement(node: object | null | undefined, opts?: object): node is SpreadElement;
1582export function isSuper(node: object | null | undefined, opts?: object): node is Super;
1583export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object): node is TaggedTemplateExpression;
1584export function isTemplateElement(node: object | null | undefined, opts?: object): node is TemplateElement;
1585export function isTemplateLiteral(node: object | null | undefined, opts?: object): node is TemplateLiteral;
1586export function isYieldExpression(node: object | null | undefined, opts?: object): node is YieldExpression;
1587export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object): node is AnyTypeAnnotation;
1588export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object): node is ArrayTypeAnnotation;
1589export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanTypeAnnotation;
1590export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanLiteralTypeAnnotation;
1591export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NullLiteralTypeAnnotation;
1592export function isClassImplements(node: object | null | undefined, opts?: object): node is ClassImplements;
1593export function isClassProperty(node: object | null | undefined, opts?: object): node is ClassProperty;
1594export function isDeclareClass(node: object | null | undefined, opts?: object): node is DeclareClass;
1595export function isDeclareFunction(node: object | null | undefined, opts?: object): node is DeclareFunction;
1596export function isDeclareInterface(node: object | null | undefined, opts?: object): node is DeclareInterface;
1597export function isDeclareModule(node: object | null | undefined, opts?: object): node is DeclareModule;
1598export function isDeclareTypeAlias(node: object | null | undefined, opts?: object): node is DeclareTypeAlias;
1599export function isDeclareVariable(node: object | null | undefined, opts?: object): node is DeclareVariable;
1600export function isExistentialTypeParam(node: object | null | undefined, opts?: object): node is ExistentialTypeParam;
1601export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object): node is FunctionTypeAnnotation;
1602export function isFunctionTypeParam(node: object | null | undefined, opts?: object): node is FunctionTypeParam;
1603export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object): node is GenericTypeAnnotation;
1604export function isInterfaceExtends(node: object | null | undefined, opts?: object): node is InterfaceExtends;
1605export function isInterfaceDeclaration(node: object | null | undefined, opts?: object): node is InterfaceDeclaration;
1606export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): node is IntersectionTypeAnnotation;
1607export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object): node is MixedTypeAnnotation;
1608export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object): node is NullableTypeAnnotation;
1609export function isNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NumericLiteralTypeAnnotation;
1610export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object): node is NumberTypeAnnotation;
1611export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is StringLiteralTypeAnnotation;
1612export function isStringTypeAnnotation(node: object | null | undefined, opts?: object): node is StringTypeAnnotation;
1613export function isThisTypeAnnotation(node: object | null | undefined, opts?: object): node is ThisTypeAnnotation;
1614export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object): node is TupleTypeAnnotation;
1615export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeofTypeAnnotation;
1616export function isTypeAlias(node: object | null | undefined, opts?: object): node is TypeAlias;
1617export function isTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeAnnotation;
1618export function isTypeCastExpression(node: object | null | undefined, opts?: object): node is TypeCastExpression;
1619export function isTypeParameter(node: object | null | undefined, opts?: object): node is TypeParameter;
1620export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TypeParameterDeclaration;
1621export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TypeParameterInstantiation;
1622export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object): node is ObjectTypeAnnotation;
1623export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object): node is ObjectTypeCallProperty;
1624export function isObjectTypeIndexer(node: object | null | undefined, opts?: object): node is ObjectTypeIndexer;
1625export function isObjectTypeProperty(node: object | null | undefined, opts?: object): node is ObjectTypeProperty;
1626export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): node is QualifiedTypeIdentifier;
1627export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object): node is UnionTypeAnnotation;
1628export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object): node is VoidTypeAnnotation;
1629export function isJSXAttribute(node: object | null | undefined, opts?: object): node is JSXAttribute;
1630export function isJSXClosingElement(node: object | null | undefined, opts?: object): node is JSXClosingElement;
1631export function isJSXElement(node: object | null | undefined, opts?: object): node is JSXElement;
1632export function isJSXEmptyExpression(node: object | null | undefined, opts?: object): node is JSXEmptyExpression;
1633export function isJSXExpressionContainer(node: object | null | undefined, opts?: object): node is JSXExpressionContainer;
1634export function isJSXIdentifier(node: object | null | undefined, opts?: object): node is JSXIdentifier;
1635export function isJSXMemberExpression(node: object | null | undefined, opts?: object): node is JSXMemberExpression;
1636export function isJSXNamespacedName(node: object | null | undefined, opts?: object): node is JSXNamespacedName;
1637export function isJSXOpeningElement(node: object | null | undefined, opts?: object): node is JSXOpeningElement;
1638export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object): node is JSXSpreadAttribute;
1639export function isJSXText(node: object | null | undefined, opts?: object): node is JSXText;
1640export function isNoop(node: object | null | undefined, opts?: object): node is Noop;
1641export function isParenthesizedExpression(node: object | null | undefined, opts?: object): node is ParenthesizedExpression;
1642export function isAwaitExpression(node: object | null | undefined, opts?: object): node is AwaitExpression;
1643export function isBindExpression(node: object | null | undefined, opts?: object): node is BindExpression;
1644export function isDecorator(node: object | null | undefined, opts?: object): node is Decorator;
1645export function isDoExpression(node: object | null | undefined, opts?: object): node is DoExpression;
1646export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ExportDefaultSpecifier;
1647export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ExportNamespaceSpecifier;
1648export function isRestProperty(node: object | null | undefined, opts?: object): node is RestProperty;
1649export function isSpreadProperty(node: object | null | undefined, opts?: object): node is SpreadProperty;
1650export function isExpression(node: object | null | undefined, opts?: object): node is Expression;
1651export function isBinary(node: object | null | undefined, opts?: object): node is Binary;
1652export function isScopable(node: object | null | undefined, opts?: object): node is Scopable;
1653export function isBlockParent(node: object | null | undefined, opts?: object): node is BlockParent;
1654export function isBlock(node: object | null | undefined, opts?: object): node is Block;
1655export function isStatement(node: object | null | undefined, opts?: object): node is Statement;
1656export function isTerminatorless(node: object | null | undefined, opts?: object): node is Terminatorless;
1657export function isCompletionStatement(node: object | null | undefined, opts?: object): node is CompletionStatement;
1658export function isConditional(node: object | null | undefined, opts?: object): node is Conditional;
1659export function isLoop(node: object | null | undefined, opts?: object): node is Loop;
1660export function isWhile(node: object | null | undefined, opts?: object): node is While;
1661export function isExpressionWrapper(node: object | null | undefined, opts?: object): node is ExpressionWrapper;
1662export function isFor(node: object | null | undefined, opts?: object): node is For;
1663export function isForXStatement(node: object | null | undefined, opts?: object): node is ForXStatement;
1664// tslint:disable-next-line ban-types
1665export function isFunction(node: object | null | undefined, opts?: object): node is Function;
1666export function isFunctionParent(node: object | null | undefined, opts?: object): node is FunctionParent;
1667export function isPureish(node: object | null | undefined, opts?: object): node is Pureish;
1668export function isDeclaration(node: object | null | undefined, opts?: object): node is Declaration;
1669export function isLVal(node: object | null | undefined, opts?: object): node is LVal;
1670export function isLiteral(node: object | null | undefined, opts?: object): node is Literal;
1671export function isImmutable(node: object | null | undefined, opts?: object): node is Immutable;
1672export function isUserWhitespacable(node: object | null | undefined, opts?: object): node is UserWhitespacable;
1673export function isMethod(node: object | null | undefined, opts?: object): node is Method;
1674export function isObjectMember(node: object | null | undefined, opts?: object): node is ObjectMember;
1675export function isProperty(node: object | null | undefined, opts?: object): node is Property;
1676export function isUnaryLike(node: object | null | undefined, opts?: object): node is UnaryLike;
1677export function isPattern(node: object | null | undefined, opts?: object): node is Pattern;
1678export function isClass(node: object | null | undefined, opts?: object): node is Class;
1679export function isModuleDeclaration(node: object | null | undefined, opts?: object): node is ModuleDeclaration;
1680export function isExportDeclaration(node: object | null | undefined, opts?: object): node is ExportDeclaration;
1681export function isModuleSpecifier(node: object | null | undefined, opts?: object): node is ModuleSpecifier;
1682export function isFlow(node: object | null | undefined, opts?: object): node is Flow;
1683export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object): node is FlowBaseAnnotation;
1684export function isFlowDeclaration(node: object | null | undefined, opts?: object): node is FlowDeclaration;
1685export function isJSX(node: object | null | undefined, opts?: object): node is JSX;
1686
1687export function isReferencedIdentifier(node: object | null | undefined, opts?: object): node is Identifier | JSXIdentifier;
1688export function isReferencedMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
1689export function isBindingIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
1690export function isScope(node: object | null | undefined, opts?: object): node is Scopable;
1691export function isReferenced(node: object | null | undefined, opts?: object): boolean;
1692export function isBlockScoped(node: object | null | undefined, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
1693export function isVar(node: object | null | undefined, opts?: object): node is VariableDeclaration;
1694export function isUser(node: object | null | undefined, opts?: object): boolean;
1695export function isGenerated(node: object | null | undefined, opts?: object): boolean;
1696export function isPure(node: object | null | undefined, opts?: object): boolean;
1697
1698export function isTSAnyKeyword(node: object | null | undefined, opts?: object): node is TSAnyKeyword;
1699export function isTSArrayType(node: object | null | undefined, opts?: object): node is TSArrayType;
1700export function isTSAsExpression(node: object | null | undefined, opts?: object): node is TSAsExpression;
1701export function isTSBooleanKeyword(node: object | null | undefined, opts?: object): node is TSBooleanKeyword;
1702export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSCallSignatureDeclaration;
1703export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSTypeElement;
1704export function isTSConstructorType(node: object | null | undefined, opts?: object): node is TSConstructorType;
1705export function isTSDeclareFunction(node: object | null | undefined, opts?: object): node is TSDeclareFunction;
1706export function isTSDeclareMethod(node: object | null | undefined, opts?: object): node is TSDeclareMethod;
1707export function isTSEnumDeclaration(node: object | null | undefined, opts?: object): node is TSEnumDeclaration;
1708export function isTSEnumMember(node: object | null | undefined, opts?: object): node is TSEnumMember;
1709export function isTSExportAssignment(node: object | null | undefined, opts?: object): node is TSExportAssignment;
1710export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): node is TSExpressionWithTypeArguments;
1711export function isTSExternalModuleReference(node: object | null | undefined, opts?: object): node is TSExternalModuleReference;
1712export function isTSFunctionType(node: object | null | undefined, opts?: object): node is TSFunctionType;
1713export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): node is TSImportEqualsDeclaration;
1714export function isTSIndexSignature(node: object | null | undefined, opts?: object): node is TSIndexSignature;
1715export function isTSIndexedAccessType(node: object | null | undefined, opts?: object): node is TSIndexedAccessType;
1716export function isTSInterfaceBody(node: object | null | undefined, opts?: object): node is TSInterfaceBody;
1717export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object): node is TSInterfaceDeclaration;
1718export function isTSIntersectionType(node: object | null | undefined, opts?: object): node is TSIntersectionType;
1719export function isTSLiteralType(node: object | null | undefined, opts?: object): node is TSLiteralType;
1720export function isTSMappedType(node: object | null | undefined, opts?: object): node is TSMappedType;
1721export function isTSMethodSignature(node: object | null | undefined, opts?: object): node is TSMethodSignature;
1722export function isTSModuleBlock(node: object | null | undefined, opts?: object): node is TSModuleBlock;
1723export function isTSModuleDeclaration(node: object | null | undefined, opts?: object): node is TSModuleDeclaration;
1724export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): node is TSNamespaceExportDeclaration;
1725export function isTSNeverKeyword(node: object | null | undefined, opts?: object): node is TSNeverKeyword;
1726export function isTSNonNullExpression(node: object | null | undefined, opts?: object): node is TSNonNullExpression;
1727export function isTSNullKeyword(node: object | null | undefined, opts?: object): node is TSNullKeyword;
1728export function isTSNumberKeyword(node: object | null | undefined, opts?: object): node is TSNumberKeyword;
1729export function isTSObjectKeyword(node: object | null | undefined, opts?: object): node is TSObjectKeyword;
1730export function isTSParameterProperty(node: object | null | undefined, opts?: object): node is TSParameterProperty;
1731export function isTSParenthesizedType(node: object | null | undefined, opts?: object): node is TSParenthesizedType;
1732export function isTSPropertySignature(node: object | null | undefined, opts?: object): node is TSPropertySignature;
1733export function isTSQualifiedName(node: object | null | undefined, opts?: object): node is TSQualifiedName;
1734export function isTSStringKeyword(node: object | null | undefined, opts?: object): node is TSStringKeyword;
1735export function isTSSymbolKeyword(node: object | null | undefined, opts?: object): node is TSSymbolKeyword;
1736export function isTSThisType(node: object | null | undefined, opts?: object): node is TSThisType;
1737export function isTSTupleType(node: object | null | undefined, opts?: object): node is TSTupleType;
1738export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): node is TSTypeAliasDeclaration;
1739export function isTSTypeAnnotation(node: object | null | undefined, opts?: object): node is TSTypeAnnotation;
1740export function isTSTypeAssertion(node: object | null | undefined, opts?: object): node is TSTypeAssertion;
1741export function isTSTypeLiteral(node: object | null | undefined, opts?: object): node is TSTypeLiteral;
1742export function isTSTypeOperator(node: object | null | undefined, opts?: object): node is TSTypeOperator;
1743export function isTSTypeParameter(node: object | null | undefined, opts?: object): node is TSTypeParameter;
1744export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TSTypeParameterDeclaration;
1745export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TSTypeParameterInstantiation;
1746export function isTSTypePredicate(node: object | null | undefined, opts?: object): node is TSTypePredicate;
1747export function isTSTypeQuery(node: object | null | undefined, opts?: object): node is TSTypeQuery;
1748export function isTSTypeReference(node: object | null | undefined, opts?: object): node is TSTypeReference;
1749export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object): node is TSUndefinedKeyword;
1750export function isTSUnionType(node: object | null | undefined, opts?: object): node is TSUnionType;
1751export function isTSVoidKeyword(node: object | null | undefined, opts?: object): node is TSVoidKeyword;
1752
1753// React specific
1754export interface ReactHelpers {
1755 isCompatTag(tagName?: string): boolean;
1756 buildChildren(node: object): Node[];
1757}
1758export const react: ReactHelpers;
1759
1760export function assertArrayExpression(node: object | null | undefined, opts?: object): void;
1761export function assertAssignmentExpression(node: object | null | undefined, opts?: object): void;
1762export function assertBinaryExpression(node: object | null | undefined, opts?: object): void;
1763export function assertDirective(node: object | null | undefined, opts?: object): void;
1764export function assertDirectiveLiteral(node: object | null | undefined, opts?: object): void;
1765export function assertBlockStatement(node: object | null | undefined, opts?: object): void;
1766export function assertBreakStatement(node: object | null | undefined, opts?: object): void;
1767export function assertCallExpression(node: object | null | undefined, opts?: object): void;
1768export function assertCatchClause(node: object | null | undefined, opts?: object): void;
1769export function assertConditionalExpression(node: object | null | undefined, opts?: object): void;
1770export function assertContinueStatement(node: object | null | undefined, opts?: object): void;
1771export function assertDebuggerStatement(node: object | null | undefined, opts?: object): void;
1772export function assertDoWhileStatement(node: object | null | undefined, opts?: object): void;
1773export function assertEmptyStatement(node: object | null | undefined, opts?: object): void;
1774export function assertExpressionStatement(node: object | null | undefined, opts?: object): void;
1775export function assertFile(node: object | null | undefined, opts?: object): void;
1776export function assertForInStatement(node: object | null | undefined, opts?: object): void;
1777export function assertForStatement(node: object | null | undefined, opts?: object): void;
1778export function assertFunctionDeclaration(node: object | null | undefined, opts?: object): void;
1779export function assertFunctionExpression(node: object | null | undefined, opts?: object): void;
1780export function assertIdentifier(node: object | null | undefined, opts?: object): void;
1781export function assertIfStatement(node: object | null | undefined, opts?: object): void;
1782export function assertLabeledStatement(node: object | null | undefined, opts?: object): void;
1783export function assertStringLiteral(node: object | null | undefined, opts?: object): void;
1784export function assertNumericLiteral(node: object | null | undefined, opts?: object): void;
1785
1786/** @deprecated Use `assertNumericLiteral` */
1787export function assertNumberLiteral(node: object | null | undefined, opts?: object): void;
1788export function assertNullLiteral(node: object | null | undefined, opts?: object): void;
1789export function assertBooleanLiteral(node: object | null | undefined, opts?: object): void;
1790export function assertRegExpLiteral(node: object | null | undefined, opts?: object): void;
1791
1792/** @deprecated Use `assertRegExpLiteral` */
1793export function assertRegexLiteral(node: object | null | undefined, opts?: object): void;
1794export function assertLogicalExpression(node: object | null | undefined, opts?: object): void;
1795export function assertMemberExpression(node: object | null | undefined, opts?: object): void;
1796export function assertNewExpression(node: object | null | undefined, opts?: object): void;
1797export function assertProgram(node: object | null | undefined, opts?: object): void;
1798export function assertObjectExpression(node: object | null | undefined, opts?: object): void;
1799export function assertObjectMethod(node: object | null | undefined, opts?: object): void;
1800export function assertObjectProperty(node: object | null | undefined, opts?: object): void;
1801export function assertRestElement(node: object | null | undefined, opts?: object): void;
1802export function assertReturnStatement(node: object | null | undefined, opts?: object): void;
1803export function assertSequenceExpression(node: object | null | undefined, opts?: object): void;
1804export function assertSwitchCase(node: object | null | undefined, opts?: object): void;
1805export function assertSwitchStatement(node: object | null | undefined, opts?: object): void;
1806export function assertThisExpression(node: object | null | undefined, opts?: object): void;
1807export function assertThrowStatement(node: object | null | undefined, opts?: object): void;
1808export function assertTryStatement(node: object | null | undefined, opts?: object): void;
1809export function assertUnaryExpression(node: object | null | undefined, opts?: object): void;
1810export function assertUpdateExpression(node: object | null | undefined, opts?: object): void;
1811export function assertVariableDeclaration(node: object | null | undefined, opts?: object): void;
1812export function assertVariableDeclarator(node: object | null | undefined, opts?: object): void;
1813export function assertWhileStatement(node: object | null | undefined, opts?: object): void;
1814export function assertWithStatement(node: object | null | undefined, opts?: object): void;
1815export function assertAssignmentPattern(node: object | null | undefined, opts?: object): void;
1816export function assertArrayPattern(node: object | null | undefined, opts?: object): void;
1817export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object): void;
1818export function assertClassBody(node: object | null | undefined, opts?: object): void;
1819export function assertClassDeclaration(node: object | null | undefined, opts?: object): void;
1820export function assertClassExpression(node: object | null | undefined, opts?: object): void;
1821export function assertExportAllDeclaration(node: object | null | undefined, opts?: object): void;
1822export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object): void;
1823export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object): void;
1824export function assertExportSpecifier(node: object | null | undefined, opts?: object): void;
1825export function assertForOfStatement(node: object | null | undefined, opts?: object): void;
1826export function assertImportDeclaration(node: object | null | undefined, opts?: object): void;
1827export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
1828export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
1829export function assertImportSpecifier(node: object | null | undefined, opts?: object): void;
1830export function assertMetaProperty(node: object | null | undefined, opts?: object): void;
1831export function assertClassMethod(node: object | null | undefined, opts?: object): void;
1832export function assertObjectPattern(node: object | null | undefined, opts?: object): void;
1833export function assertSpreadElement(node: object | null | undefined, opts?: object): void;
1834export function assertSuper(node: object | null | undefined, opts?: object): void;
1835export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object): void;
1836export function assertTemplateElement(node: object | null | undefined, opts?: object): void;
1837export function assertTemplateLiteral(node: object | null | undefined, opts?: object): void;
1838export function assertYieldExpression(node: object | null | undefined, opts?: object): void;
1839export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object): void;
1840export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object): void;
1841export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object): void;
1842export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
1843export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
1844export function assertClassImplements(node: object | null | undefined, opts?: object): void;
1845export function assertClassProperty(node: object | null | undefined, opts?: object): void;
1846export function assertDeclareClass(node: object | null | undefined, opts?: object): void;
1847export function assertDeclareFunction(node: object | null | undefined, opts?: object): void;
1848export function assertDeclareInterface(node: object | null | undefined, opts?: object): void;
1849export function assertDeclareModule(node: object | null | undefined, opts?: object): void;
1850export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object): void;
1851export function assertDeclareVariable(node: object | null | undefined, opts?: object): void;
1852export function assertExistentialTypeParam(node: object | null | undefined, opts?: object): void;
1853export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object): void;
1854export function assertFunctionTypeParam(node: object | null | undefined, opts?: object): void;
1855export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object): void;
1856export function assertInterfaceExtends(node: object | null | undefined, opts?: object): void;
1857export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
1858export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): void;
1859export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object): void;
1860export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object): void;
1861export function assertNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
1862export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object): void;
1863export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
1864export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object): void;
1865export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object): void;
1866export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object): void;
1867export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object): void;
1868export function assertTypeAlias(node: object | null | undefined, opts?: object): void;
1869export function assertTypeAnnotation(node: object | null | undefined, opts?: object): void;
1870export function assertTypeCastExpression(node: object | null | undefined, opts?: object): void;
1871export function assertTypeParameter(node: object | null | undefined, opts?: object): void;
1872export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
1873export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
1874export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object): void;
1875export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object): void;
1876export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object): void;
1877export function assertObjectTypeProperty(node: object | null | undefined, opts?: object): void;
1878export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): void;
1879export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object): void;
1880export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object): void;
1881export function assertJSXAttribute(node: object | null | undefined, opts?: object): void;
1882export function assertJSXClosingElement(node: object | null | undefined, opts?: object): void;
1883export function assertJSXElement(node: object | null | undefined, opts?: object): void;
1884export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object): void;
1885export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object): void;
1886export function assertJSXIdentifier(node: object | null | undefined, opts?: object): void;
1887export function assertJSXMemberExpression(node: object | null | undefined, opts?: object): void;
1888export function assertJSXNamespacedName(node: object | null | undefined, opts?: object): void;
1889export function assertJSXOpeningElement(node: object | null | undefined, opts?: object): void;
1890export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object): void;
1891export function assertJSXText(node: object | null | undefined, opts?: object): void;
1892export function assertNoop(node: object | null | undefined, opts?: object): void;
1893export function assertParenthesizedExpression(node: object | null | undefined, opts?: object): void;
1894export function assertAwaitExpression(node: object | null | undefined, opts?: object): void;
1895export function assertBindExpression(node: object | null | undefined, opts?: object): void;
1896export function assertDecorator(node: object | null | undefined, opts?: object): void;
1897export function assertDoExpression(node: object | null | undefined, opts?: object): void;
1898export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
1899export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
1900export function assertRestProperty(node: object | null | undefined, opts?: object): void;
1901export function assertSpreadProperty(node: object | null | undefined, opts?: object): void;
1902export function assertExpression(node: object | null | undefined, opts?: object): void;
1903export function assertBinary(node: object | null | undefined, opts?: object): void;
1904export function assertScopable(node: object | null | undefined, opts?: object): void;
1905export function assertBlockParent(node: object | null | undefined, opts?: object): void;
1906export function assertBlock(node: object | null | undefined, opts?: object): void;
1907export function assertStatement(node: object | null | undefined, opts?: object): void;
1908export function assertTerminatorless(node: object | null | undefined, opts?: object): void;
1909export function assertCompletionStatement(node: object | null | undefined, opts?: object): void;
1910export function assertConditional(node: object | null | undefined, opts?: object): void;
1911export function assertLoop(node: object | null | undefined, opts?: object): void;
1912export function assertWhile(node: object | null | undefined, opts?: object): void;
1913export function assertExpressionWrapper(node: object | null | undefined, opts?: object): void;
1914export function assertFor(node: object | null | undefined, opts?: object): void;
1915export function assertForXStatement(node: object | null | undefined, opts?: object): void;
1916export function assertFunction(node: object | null | undefined, opts?: object): void;
1917export function assertFunctionParent(node: object | null | undefined, opts?: object): void;
1918export function assertPureish(node: object | null | undefined, opts?: object): void;
1919export function assertDeclaration(node: object | null | undefined, opts?: object): void;
1920export function assertLVal(node: object | null | undefined, opts?: object): void;
1921export function assertLiteral(node: object | null | undefined, opts?: object): void;
1922export function assertImmutable(node: object | null | undefined, opts?: object): void;
1923export function assertUserWhitespacable(node: object | null | undefined, opts?: object): void;
1924export function assertMethod(node: object | null | undefined, opts?: object): void;
1925export function assertObjectMember(node: object | null | undefined, opts?: object): void;
1926export function assertProperty(node: object | null | undefined, opts?: object): void;
1927export function assertUnaryLike(node: object | null | undefined, opts?: object): void;
1928export function assertPattern(node: object | null | undefined, opts?: object): void;
1929export function assertClass(node: object | null | undefined, opts?: object): void;
1930export function assertModuleDeclaration(node: object | null | undefined, opts?: object): void;
1931export function assertExportDeclaration(node: object | null | undefined, opts?: object): void;
1932export function assertModuleSpecifier(node: object | null | undefined, opts?: object): void;
1933export function assertFlow(node: object | null | undefined, opts?: object): void;
1934export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object): void;
1935export function assertFlowDeclaration(node: object | null | undefined, opts?: object): void;
1936export function assertJSX(node: object | null | undefined, opts?: object): void;
1937
1938export function assertTSAnyKeyword(node: object | null | undefined, opts?: object): void;
1939export function assertTSArrayType(node: object | null | undefined, opts?: object): void;
1940export function assertTSAsExpression(node: object | null | undefined, opts?: object): void;
1941export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object): void;
1942export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): void;
1943export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): void;
1944export function assertTSConstructorType(node: object | null | undefined, opts?: object): void;
1945export function assertTSDeclareFunction(node: object | null | undefined, opts?: object): void;
1946export function assertTSDeclareMethod(node: object | null | undefined, opts?: object): void;
1947export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object): void;
1948export function assertTSEnumMember(node: object | null | undefined, opts?: object): void;
1949export function assertTSExportAssignment(node: object | null | undefined, opts?: object): void;
1950export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): void;
1951export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object): void;
1952export function assertTSFunctionType(node: object | null | undefined, opts?: object): void;
1953export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): void;
1954export function assertTSIndexSignature(node: object | null | undefined, opts?: object): void;
1955export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object): void;
1956export function assertTSInterfaceBody(node: object | null | undefined, opts?: object): void;
1957export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
1958export function assertTSIntersectionType(node: object | null | undefined, opts?: object): void;
1959export function assertTSLiteralType(node: object | null | undefined, opts?: object): void;
1960export function assertTSMappedType(node: object | null | undefined, opts?: object): void;
1961export function assertTSMethodSignature(node: object | null | undefined, opts?: object): void;
1962export function assertTSModuleBlock(node: object | null | undefined, opts?: object): void;
1963export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object): void;
1964export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): void;
1965export function assertTSNeverKeyword(node: object | null | undefined, opts?: object): void;
1966export function assertTSNonNullExpression(node: object | null | undefined, opts?: object): void;
1967export function assertTSNullKeyword(node: object | null | undefined, opts?: object): void;
1968export function assertTSNumberKeyword(node: object | null | undefined, opts?: object): void;
1969export function assertTSObjectKeyword(node: object | null | undefined, opts?: object): void;
1970export function assertTSParameterProperty(node: object | null | undefined, opts?: object): void;
1971export function assertTSParenthesizedType(node: object | null | undefined, opts?: object): void;
1972export function assertTSPropertySignature(node: object | null | undefined, opts?: object): void;
1973export function assertTSQualifiedName(node: object | null | undefined, opts?: object): void;
1974export function assertTSStringKeyword(node: object | null | undefined, opts?: object): void;
1975export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object): void;
1976export function assertTSThisType(node: object | null | undefined, opts?: object): void;
1977export function assertTSTupleType(node: object | null | undefined, opts?: object): void;
1978export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): void;
1979export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object): void;
1980export function assertTSTypeAssertion(node: object | null | undefined, opts?: object): void;
1981export function assertTSTypeLiteral(node: object | null | undefined, opts?: object): void;
1982export function assertTSTypeOperator(node: object | null | undefined, opts?: object): void;
1983export function assertTSTypeParameter(node: object | null | undefined, opts?: object): void;
1984export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
1985export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
1986export function assertTSTypePredicate(node: object | null | undefined, opts?: object): void;
1987export function assertTSTypeQuery(node: object | null | undefined, opts?: object): void;
1988export function assertTSTypeReference(node: object | null | undefined, opts?: object): void;
1989export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object): void;
1990export function assertTSUnionType(node: object | null | undefined, opts?: object): void;
1991export function assertTSVoidKeyword(node: object | null | undefined, opts?: object): void;