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