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