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