UNPKG

40.4 kBMarkdownView Raw
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<Expression>` (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### declareFunction
411```javascript
412t.declareFunction(id)
413```
414
415See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`.
416
417Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
418
419 - `id` (required)
420
421---
422
423### declareInterface
424```javascript
425t.declareInterface(id, typeParameters, extends, body)
426```
427
428See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`.
429
430Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
431
432 - `id` (required)
433 - `typeParameters` (required)
434 - `extends` (required)
435 - `body` (required)
436
437---
438
439### declareModule
440```javascript
441t.declareModule(id, body)
442```
443
444See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`.
445
446Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
447
448 - `id` (required)
449 - `body` (required)
450
451---
452
453### declareModuleExports
454```javascript
455t.declareModuleExports(typeAnnotation)
456```
457
458See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`.
459
460Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
461
462 - `typeAnnotation` (required)
463
464---
465
466### declareTypeAlias
467```javascript
468t.declareTypeAlias(id, typeParameters, right)
469```
470
471See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`.
472
473Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
474
475 - `id` (required)
476 - `typeParameters` (required)
477 - `right` (required)
478
479---
480
481### declareVariable
482```javascript
483t.declareVariable(id)
484```
485
486See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`.
487
488Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
489
490 - `id` (required)
491
492---
493
494### decorator
495```javascript
496t.decorator(expression)
497```
498
499See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`.
500
501 - `expression`: `Expression` (required)
502
503---
504
505### directive
506```javascript
507t.directive(value)
508```
509
510See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`.
511
512 - `value`: `DirectiveLiteral` (required)
513
514---
515
516### directiveLiteral
517```javascript
518t.directiveLiteral(value)
519```
520
521See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`.
522
523 - `value`: `string` (required)
524
525---
526
527### doExpression
528```javascript
529t.doExpression(body)
530```
531
532See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`.
533
534Aliases: `Expression`
535
536 - `body`: `BlockStatement` (required)
537
538---
539
540### doWhileStatement
541```javascript
542t.doWhileStatement(test, body)
543```
544
545See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`.
546
547Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
548
549 - `test`: `Expression` (required)
550 - `body`: `Statement` (required)
551
552---
553
554### emptyStatement
555```javascript
556t.emptyStatement()
557```
558
559See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`.
560
561Aliases: `Statement`
562
563
564---
565
566### emptyTypeAnnotation
567```javascript
568t.emptyTypeAnnotation()
569```
570
571See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`.
572
573Aliases: `Flow`, `FlowBaseAnnotation`
574
575
576---
577
578### existentialTypeParam
579```javascript
580t.existentialTypeParam()
581```
582
583See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`.
584
585Aliases: `Flow`
586
587
588---
589
590### exportAllDeclaration
591```javascript
592t.exportAllDeclaration(source)
593```
594
595See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`.
596
597Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
598
599 - `source`: `StringLiteral` (required)
600
601---
602
603### exportDefaultDeclaration
604```javascript
605t.exportDefaultDeclaration(declaration)
606```
607
608See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`.
609
610Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
611
612 - `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required)
613
614---
615
616### exportDefaultSpecifier
617```javascript
618t.exportDefaultSpecifier(exported)
619```
620
621See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`.
622
623Aliases: `ModuleSpecifier`
624
625 - `exported`: `Identifier` (required)
626
627---
628
629### exportNamedDeclaration
630```javascript
631t.exportNamedDeclaration(declaration, specifiers, source)
632```
633
634See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`.
635
636Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
637
638 - `declaration`: `Declaration` (default: `null`)
639 - `specifiers`: `Array<ExportSpecifier>` (required)
640 - `source`: `StringLiteral` (default: `null`)
641
642---
643
644### exportNamespaceSpecifier
645```javascript
646t.exportNamespaceSpecifier(exported)
647```
648
649See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`.
650
651Aliases: `ModuleSpecifier`
652
653 - `exported`: `Identifier` (required)
654
655---
656
657### exportSpecifier
658```javascript
659t.exportSpecifier(local, exported)
660```
661
662See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`.
663
664Aliases: `ModuleSpecifier`
665
666 - `local`: `Identifier` (required)
667 - `exported`: `Identifier` (required)
668
669---
670
671### expressionStatement
672```javascript
673t.expressionStatement(expression)
674```
675
676See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`.
677
678Aliases: `Statement`, `ExpressionWrapper`
679
680 - `expression`: `Expression` (required)
681
682---
683
684### file
685```javascript
686t.file(program, comments, tokens)
687```
688
689See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
690
691 - `program`: `Program` (required)
692 - `comments` (required)
693 - `tokens` (required)
694
695---
696
697### forAwaitStatement
698```javascript
699t.forAwaitStatement(left, right, body)
700```
701
702See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`.
703
704Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
705
706 - `left`: `VariableDeclaration | LVal` (required)
707 - `right`: `Expression` (required)
708 - `body`: `Statement` (required)
709
710---
711
712### forInStatement
713```javascript
714t.forInStatement(left, right, body)
715```
716
717See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`.
718
719Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
720
721 - `left`: `VariableDeclaration | LVal` (required)
722 - `right`: `Expression` (required)
723 - `body`: `Statement` (required)
724
725---
726
727### forOfStatement
728```javascript
729t.forOfStatement(left, right, body)
730```
731
732See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(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### forStatement
743```javascript
744t.forStatement(init, test, update, body)
745```
746
747See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`.
748
749Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`
750
751 - `init`: `VariableDeclaration | Expression` (default: `null`)
752 - `test`: `Expression` (default: `null`)
753 - `update`: `Expression` (default: `null`)
754 - `body`: `Statement` (required)
755
756---
757
758### functionDeclaration
759```javascript
760t.functionDeclaration(id, params, body, generator, async)
761```
762
763See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`.
764
765Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration`
766
767 - `id`: `Identifier` (required)
768 - `params`: `Array<LVal>` (required)
769 - `body`: `BlockStatement` (required)
770 - `generator`: `boolean` (default: `false`)
771 - `async`: `boolean` (default: `false`)
772 - `returnType` (default: `null`)
773 - `typeParameters` (default: `null`)
774
775---
776
777### functionExpression
778```javascript
779t.functionExpression(id, params, body, generator, async)
780```
781
782See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`.
783
784Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish`
785
786 - `id`: `Identifier` (default: `null`)
787 - `params`: `Array<LVal>` (required)
788 - `body`: `BlockStatement` (required)
789 - `generator`: `boolean` (default: `false`)
790 - `async`: `boolean` (default: `false`)
791 - `returnType` (default: `null`)
792 - `typeParameters` (default: `null`)
793
794---
795
796### functionTypeAnnotation
797```javascript
798t.functionTypeAnnotation(typeParameters, params, rest, returnType)
799```
800
801See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`.
802
803Aliases: `Flow`
804
805 - `typeParameters` (required)
806 - `params` (required)
807 - `rest` (required)
808 - `returnType` (required)
809
810---
811
812### functionTypeParam
813```javascript
814t.functionTypeParam(name, typeAnnotation)
815```
816
817See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`.
818
819Aliases: `Flow`
820
821 - `name` (required)
822 - `typeAnnotation` (required)
823
824---
825
826### genericTypeAnnotation
827```javascript
828t.genericTypeAnnotation(id, typeParameters)
829```
830
831See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`.
832
833Aliases: `Flow`
834
835 - `id` (required)
836 - `typeParameters` (required)
837
838---
839
840### identifier
841```javascript
842t.identifier(name)
843```
844
845See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`.
846
847Aliases: `Expression`, `LVal`
848
849 - `name``string` (required)
850 - `decorators`: `Array<Decorator>` (default: `null`)
851 - `typeAnnotation` (default: `null`)
852
853---
854
855### ifStatement
856```javascript
857t.ifStatement(test, consequent, alternate)
858```
859
860See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`.
861
862Aliases: `Statement`, `Conditional`
863
864 - `test`: `Expression` (required)
865 - `consequent`: `Statement` (required)
866 - `alternate`: `Statement` (default: `null`)
867
868---
869
870### import
871```javascript
872t.import()
873```
874
875See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
876
877Aliases: `Expression`
878
879
880---
881
882### importDeclaration
883```javascript
884t.importDeclaration(specifiers, source)
885```
886
887See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`.
888
889Aliases: `Statement`, `Declaration`, `ModuleDeclaration`
890
891 - `specifiers`: `Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>` (required)
892 - `source`: `StringLiteral` (required)
893
894---
895
896### importDefaultSpecifier
897```javascript
898t.importDefaultSpecifier(local)
899```
900
901See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`.
902
903Aliases: `ModuleSpecifier`
904
905 - `local`: `Identifier` (required)
906
907---
908
909### importNamespaceSpecifier
910```javascript
911t.importNamespaceSpecifier(local)
912```
913
914See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`.
915
916Aliases: `ModuleSpecifier`
917
918 - `local`: `Identifier` (required)
919
920---
921
922### importSpecifier
923```javascript
924t.importSpecifier(local, imported)
925```
926
927See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`.
928
929Aliases: `ModuleSpecifier`
930
931 - `local`: `Identifier` (required)
932 - `imported`: `Identifier` (required)
933
934---
935
936### interfaceDeclaration
937```javascript
938t.interfaceDeclaration(id, typeParameters, extends, body)
939```
940
941See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`.
942
943Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
944
945 - `id` (required)
946 - `typeParameters` (required)
947 - `extends` (required)
948 - `body` (required)
949
950---
951
952### interfaceExtends
953```javascript
954t.interfaceExtends(id, typeParameters)
955```
956
957See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`.
958
959Aliases: `Flow`
960
961 - `id` (required)
962 - `typeParameters` (required)
963
964---
965
966### intersectionTypeAnnotation
967```javascript
968t.intersectionTypeAnnotation(types)
969```
970
971See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`.
972
973Aliases: `Flow`
974
975 - `types` (required)
976
977---
978
979### jSXAttribute
980```javascript
981t.jSXAttribute(name, value)
982```
983
984See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`.
985
986Aliases: `JSX`, `Immutable`
987
988 - `name`: `JSXIdentifier | JSXNamespacedName` (required)
989 - `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`)
990
991---
992
993### jSXClosingElement
994```javascript
995t.jSXClosingElement(name)
996```
997
998See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`.
999
1000Aliases: `JSX`, `Immutable`
1001
1002 - `name`: `JSXIdentifier | JSXMemberExpression` (required)
1003
1004---
1005
1006### jSXElement
1007```javascript
1008t.jSXElement(openingElement, closingElement, children, selfClosing)
1009```
1010
1011See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`.
1012
1013Aliases: `JSX`, `Immutable`, `Expression`
1014
1015 - `openingElement`: `JSXOpeningElement` (required)
1016 - `closingElement`: `JSXClosingElement` (default: `null`)
1017 - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement>` (required)
1018 - `selfClosing` (required)
1019
1020---
1021
1022### jSXEmptyExpression
1023```javascript
1024t.jSXEmptyExpression()
1025```
1026
1027See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`.
1028
1029Aliases: `JSX`, `Expression`
1030
1031
1032---
1033
1034### jSXExpressionContainer
1035```javascript
1036t.jSXExpressionContainer(expression)
1037```
1038
1039See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`.
1040
1041Aliases: `JSX`, `Immutable`
1042
1043 - `expression`: `Expression` (required)
1044
1045---
1046
1047### jSXIdentifier
1048```javascript
1049t.jSXIdentifier(name)
1050```
1051
1052See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`.
1053
1054Aliases: `JSX`, `Expression`
1055
1056 - `name`: `string` (required)
1057
1058---
1059
1060### jSXMemberExpression
1061```javascript
1062t.jSXMemberExpression(object, property)
1063```
1064
1065See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`.
1066
1067Aliases: `JSX`, `Expression`
1068
1069 - `object`: `JSXMemberExpression | JSXIdentifier` (required)
1070 - `property`: `JSXIdentifier` (required)
1071
1072---
1073
1074### jSXNamespacedName
1075```javascript
1076t.jSXNamespacedName(namespace, name)
1077```
1078
1079See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`.
1080
1081Aliases: `JSX`
1082
1083 - `namespace`: `JSXIdentifier` (required)
1084 - `name`: `JSXIdentifier` (required)
1085
1086---
1087
1088### jSXOpeningElement
1089```javascript
1090t.jSXOpeningElement(name, attributes, selfClosing)
1091```
1092
1093See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`.
1094
1095Aliases: `JSX`, `Immutable`
1096
1097 - `name`: `JSXIdentifier | JSXMemberExpression` (required)
1098 - `attributes`: `Array<JSXAttribute | JSXSpreadAttribute>` (required)
1099 - `selfClosing`: `boolean` (default: `false`)
1100
1101---
1102
1103### jSXSpreadAttribute
1104```javascript
1105t.jSXSpreadAttribute(argument)
1106```
1107
1108See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`.
1109
1110Aliases: `JSX`
1111
1112 - `argument`: `Expression` (required)
1113
1114---
1115
1116### jSXSpreadChild
1117```javascript
1118t.jSXSpreadChild(expression)
1119```
1120
1121See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
1122
1123Aliases: `JSX`, `Immutable`
1124
1125 - `expression`: `Expression` (required)
1126
1127---
1128
1129### jSXText
1130```javascript
1131t.jSXText(value)
1132```
1133
1134See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`.
1135
1136Aliases: `JSX`, `Immutable`
1137
1138 - `value`: `string` (required)
1139
1140---
1141
1142### labeledStatement
1143```javascript
1144t.labeledStatement(label, body)
1145```
1146
1147See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`.
1148
1149Aliases: `Statement`
1150
1151 - `label`: `Identifier` (required)
1152 - `body`: `Statement` (required)
1153
1154---
1155
1156### logicalExpression
1157```javascript
1158t.logicalExpression(operator, left, right)
1159```
1160
1161See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`.
1162
1163Aliases: `Binary`, `Expression`
1164
1165 - `operator`: `'||' | '&&'` (required)
1166 - `left`: `Expression` (required)
1167 - `right`: `Expression` (required)
1168
1169---
1170
1171### memberExpression
1172```javascript
1173t.memberExpression(object, property, computed)
1174```
1175
1176See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`.
1177
1178Aliases: `Expression`, `LVal`
1179
1180 - `object`: `Expression` (required)
1181 - `property`if computed then `Expression` else `Identifier` (required)
1182 - `computed`: `boolean` (default: `false`)
1183
1184---
1185
1186### metaProperty
1187```javascript
1188t.metaProperty(meta, property)
1189```
1190
1191See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`.
1192
1193Aliases: `Expression`
1194
1195 - `meta`: `string` (required)
1196 - `property`: `string` (required)
1197
1198---
1199
1200### mixedTypeAnnotation
1201```javascript
1202t.mixedTypeAnnotation()
1203```
1204
1205See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`.
1206
1207Aliases: `Flow`, `FlowBaseAnnotation`
1208
1209
1210---
1211
1212### newExpression
1213```javascript
1214t.newExpression(callee, arguments)
1215```
1216
1217See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`.
1218
1219Aliases: `Expression`
1220
1221 - `callee`: `Expression` (required)
1222 - `arguments`: `Array<Expression | SpreadElement>` (required)
1223
1224---
1225
1226### noop
1227```javascript
1228t.noop()
1229```
1230
1231See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`.
1232
1233
1234---
1235
1236### nullLiteral
1237```javascript
1238t.nullLiteral()
1239```
1240
1241See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`.
1242
1243Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1244
1245
1246---
1247
1248### nullLiteralTypeAnnotation
1249```javascript
1250t.nullLiteralTypeAnnotation()
1251```
1252
1253See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`.
1254
1255Aliases: `Flow`, `FlowBaseAnnotation`
1256
1257
1258---
1259
1260### nullableTypeAnnotation
1261```javascript
1262t.nullableTypeAnnotation(typeAnnotation)
1263```
1264
1265See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`.
1266
1267Aliases: `Flow`
1268
1269 - `typeAnnotation` (required)
1270
1271---
1272
1273### numberTypeAnnotation
1274```javascript
1275t.numberTypeAnnotation()
1276```
1277
1278See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`.
1279
1280Aliases: `Flow`, `FlowBaseAnnotation`
1281
1282
1283---
1284
1285### numericLiteral
1286```javascript
1287t.numericLiteral(value)
1288```
1289
1290See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`.
1291
1292Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1293
1294 - `value`: `number` (required)
1295
1296---
1297
1298### numericLiteralTypeAnnotation
1299```javascript
1300t.numericLiteralTypeAnnotation()
1301```
1302
1303See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`.
1304
1305Aliases: `Flow`
1306
1307
1308---
1309
1310### objectExpression
1311```javascript
1312t.objectExpression(properties)
1313```
1314
1315See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`.
1316
1317Aliases: `Expression`
1318
1319 - `properties`: `Array<ObjectMethod | ObjectProperty | SpreadProperty>` (required)
1320
1321---
1322
1323### objectMethod
1324```javascript
1325t.objectMethod(kind, key, params, body, computed)
1326```
1327
1328See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`.
1329
1330Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember`
1331
1332 - `kind`: `"method" | "get" | "set"` (default: `'method'`)
1333 - `key`if computed then `Expression` else `Identifier | Literal` (required)
1334 - `params` (required)
1335 - `body`: `BlockStatement` (required)
1336 - `computed`: `boolean` (default: `false`)
1337 - `async`: `boolean` (default: `false`)
1338 - `decorators`: `Array<Decorator>` (default: `null`)
1339 - `generator`: `boolean` (default: `false`)
1340 - `returnType` (default: `null`)
1341 - `typeParameters` (default: `null`)
1342
1343---
1344
1345### objectPattern
1346```javascript
1347t.objectPattern(properties, typeAnnotation)
1348```
1349
1350See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`.
1351
1352Aliases: `Pattern`, `LVal`
1353
1354 - `properties`: `Array<RestProperty | Property>` (required)
1355 - `typeAnnotation` (required)
1356 - `decorators`: `Array<Decorator>` (default: `null`)
1357
1358---
1359
1360### objectProperty
1361```javascript
1362t.objectProperty(key, value, computed, shorthand, decorators)
1363```
1364
1365See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`.
1366
1367Aliases: `UserWhitespacable`, `Property`, `ObjectMember`
1368
1369 - `key`if computed then `Expression` else `Identifier | Literal` (required)
1370 - `value`: `Expression` (required)
1371 - `computed`: `boolean` (default: `false`)
1372 - `shorthand`: `boolean` (default: `false`)
1373 - `decorators`: `Array<Decorator>` (default: `null`)
1374
1375---
1376
1377### objectTypeAnnotation
1378```javascript
1379t.objectTypeAnnotation(properties, indexers, callProperties)
1380```
1381
1382See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`.
1383
1384Aliases: `Flow`
1385
1386 - `properties` (required)
1387 - `indexers` (required)
1388 - `callProperties` (required)
1389
1390---
1391
1392### objectTypeCallProperty
1393```javascript
1394t.objectTypeCallProperty(value)
1395```
1396
1397See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`.
1398
1399Aliases: `Flow`, `UserWhitespacable`
1400
1401 - `value` (required)
1402
1403---
1404
1405### objectTypeIndexer
1406```javascript
1407t.objectTypeIndexer(id, key, value)
1408```
1409
1410See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`.
1411
1412Aliases: `Flow`, `UserWhitespacable`
1413
1414 - `id` (required)
1415 - `key` (required)
1416 - `value` (required)
1417
1418---
1419
1420### objectTypeProperty
1421```javascript
1422t.objectTypeProperty(key, value)
1423```
1424
1425See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`.
1426
1427Aliases: `Flow`, `UserWhitespacable`
1428
1429 - `key` (required)
1430 - `value` (required)
1431
1432---
1433
1434### parenthesizedExpression
1435```javascript
1436t.parenthesizedExpression(expression)
1437```
1438
1439See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`.
1440
1441Aliases: `Expression`, `ExpressionWrapper`
1442
1443 - `expression`: `Expression` (required)
1444
1445---
1446
1447### program
1448```javascript
1449t.program(body, directives)
1450```
1451
1452See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`.
1453
1454Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent`
1455
1456 - `body`: `Array<Statement>` (required)
1457 - `directives`: `Array<Directive>` (default: `[]`)
1458
1459---
1460
1461### qualifiedTypeIdentifier
1462```javascript
1463t.qualifiedTypeIdentifier(id, qualification)
1464```
1465
1466See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`.
1467
1468Aliases: `Flow`
1469
1470 - `id` (required)
1471 - `qualification` (required)
1472
1473---
1474
1475### regExpLiteral
1476```javascript
1477t.regExpLiteral(pattern, flags)
1478```
1479
1480See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`.
1481
1482Aliases: `Expression`, `Literal`
1483
1484 - `pattern`: `string` (required)
1485 - `flags`: `string` (default: `''`)
1486
1487---
1488
1489### restElement
1490```javascript
1491t.restElement(argument, typeAnnotation)
1492```
1493
1494See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`.
1495
1496Aliases: `LVal`
1497
1498 - `argument`: `LVal` (required)
1499 - `typeAnnotation` (required)
1500 - `decorators`: `Array<Decorator>` (default: `null`)
1501
1502---
1503
1504### restProperty
1505```javascript
1506t.restProperty(argument)
1507```
1508
1509See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`.
1510
1511Aliases: `UnaryLike`
1512
1513 - `argument`: `LVal` (required)
1514
1515---
1516
1517### returnStatement
1518```javascript
1519t.returnStatement(argument)
1520```
1521
1522See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`.
1523
1524Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
1525
1526 - `argument`: `Expression` (default: `null`)
1527
1528---
1529
1530### sequenceExpression
1531```javascript
1532t.sequenceExpression(expressions)
1533```
1534
1535See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`.
1536
1537Aliases: `Expression`
1538
1539 - `expressions`: `Array<Expression>` (required)
1540
1541---
1542
1543### spreadElement
1544```javascript
1545t.spreadElement(argument)
1546```
1547
1548See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`.
1549
1550Aliases: `UnaryLike`
1551
1552 - `argument`: `Expression` (required)
1553
1554---
1555
1556### spreadProperty
1557```javascript
1558t.spreadProperty(argument)
1559```
1560
1561See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`.
1562
1563Aliases: `UnaryLike`
1564
1565 - `argument`: `Expression` (required)
1566
1567---
1568
1569### stringLiteral
1570```javascript
1571t.stringLiteral(value)
1572```
1573
1574See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`.
1575
1576Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1577
1578 - `value`: `string` (required)
1579
1580---
1581
1582### stringLiteralTypeAnnotation
1583```javascript
1584t.stringLiteralTypeAnnotation()
1585```
1586
1587See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`.
1588
1589Aliases: `Flow`
1590
1591
1592---
1593
1594### stringTypeAnnotation
1595```javascript
1596t.stringTypeAnnotation()
1597```
1598
1599See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`.
1600
1601Aliases: `Flow`, `FlowBaseAnnotation`
1602
1603
1604---
1605
1606### super
1607```javascript
1608t.super()
1609```
1610
1611See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`.
1612
1613Aliases: `Expression`
1614
1615
1616---
1617
1618### switchCase
1619```javascript
1620t.switchCase(test, consequent)
1621```
1622
1623See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`.
1624
1625 - `test`: `Expression` (default: `null`)
1626 - `consequent`: `Array<Statement>` (required)
1627
1628---
1629
1630### switchStatement
1631```javascript
1632t.switchStatement(discriminant, cases)
1633```
1634
1635See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`.
1636
1637Aliases: `Statement`, `BlockParent`, `Scopable`
1638
1639 - `discriminant`: `Expression` (required)
1640 - `cases`: `Array<SwitchCase>` (required)
1641
1642---
1643
1644### taggedTemplateExpression
1645```javascript
1646t.taggedTemplateExpression(tag, quasi)
1647```
1648
1649See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`.
1650
1651Aliases: `Expression`
1652
1653 - `tag`: `Expression` (required)
1654 - `quasi`: `TemplateLiteral` (required)
1655
1656---
1657
1658### templateElement
1659```javascript
1660t.templateElement(value, tail)
1661```
1662
1663See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`.
1664
1665 - `value` (required)
1666 - `tail`: `boolean` (default: `false`)
1667
1668---
1669
1670### templateLiteral
1671```javascript
1672t.templateLiteral(quasis, expressions)
1673```
1674
1675See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`.
1676
1677Aliases: `Expression`, `Literal`
1678
1679 - `quasis`: `Array<TemplateElement>` (required)
1680 - `expressions`: `Array<Expression>` (required)
1681
1682---
1683
1684### thisExpression
1685```javascript
1686t.thisExpression()
1687```
1688
1689See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`.
1690
1691Aliases: `Expression`
1692
1693
1694---
1695
1696### thisTypeAnnotation
1697```javascript
1698t.thisTypeAnnotation()
1699```
1700
1701See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`.
1702
1703Aliases: `Flow`, `FlowBaseAnnotation`
1704
1705
1706---
1707
1708### throwStatement
1709```javascript
1710t.throwStatement(argument)
1711```
1712
1713See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`.
1714
1715Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
1716
1717 - `argument`: `Expression` (required)
1718
1719---
1720
1721### tryStatement
1722```javascript
1723t.tryStatement(block, handler, finalizer)
1724```
1725
1726See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`.
1727
1728Aliases: `Statement`
1729
1730 - `block` (required)
1731 - `handler` (default: `null`)
1732 - `finalizer`: `BlockStatement` (default: `null`)
1733 - `body`: `BlockStatement` (default: `null`)
1734
1735---
1736
1737### tupleTypeAnnotation
1738```javascript
1739t.tupleTypeAnnotation(types)
1740```
1741
1742See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`.
1743
1744Aliases: `Flow`
1745
1746 - `types` (required)
1747
1748---
1749
1750### typeAlias
1751```javascript
1752t.typeAlias(id, typeParameters, right)
1753```
1754
1755See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`.
1756
1757Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
1758
1759 - `id` (required)
1760 - `typeParameters` (required)
1761 - `right` (required)
1762
1763---
1764
1765### typeAnnotation
1766```javascript
1767t.typeAnnotation(typeAnnotation)
1768```
1769
1770See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`.
1771
1772Aliases: `Flow`
1773
1774 - `typeAnnotation` (required)
1775
1776---
1777
1778### typeCastExpression
1779```javascript
1780t.typeCastExpression(expression, typeAnnotation)
1781```
1782
1783See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`.
1784
1785Aliases: `Flow`, `ExpressionWrapper`, `Expression`
1786
1787 - `expression` (required)
1788 - `typeAnnotation` (required)
1789
1790---
1791
1792### typeParameter
1793```javascript
1794t.typeParameter(bound)
1795```
1796
1797See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`.
1798
1799Aliases: `Flow`
1800
1801 - `bound` (required)
1802
1803---
1804
1805### typeParameterDeclaration
1806```javascript
1807t.typeParameterDeclaration(params)
1808```
1809
1810See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`.
1811
1812Aliases: `Flow`
1813
1814 - `params` (required)
1815
1816---
1817
1818### typeParameterInstantiation
1819```javascript
1820t.typeParameterInstantiation(params)
1821```
1822
1823See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`.
1824
1825Aliases: `Flow`
1826
1827 - `params` (required)
1828
1829---
1830
1831### typeofTypeAnnotation
1832```javascript
1833t.typeofTypeAnnotation(argument)
1834```
1835
1836See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`.
1837
1838Aliases: `Flow`
1839
1840 - `argument` (required)
1841
1842---
1843
1844### unaryExpression
1845```javascript
1846t.unaryExpression(operator, argument, prefix)
1847```
1848
1849See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`.
1850
1851Aliases: `UnaryLike`, `Expression`
1852
1853 - `operator`: `'void' | 'delete' | '!' | '+' | '-' | '++' | '--' | '~' | 'typeof'` (required)
1854 - `argument`: `Expression` (required)
1855 - `prefix`: `boolean` (default: `true`)
1856
1857---
1858
1859### unionTypeAnnotation
1860```javascript
1861t.unionTypeAnnotation(types)
1862```
1863
1864See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`.
1865
1866Aliases: `Flow`
1867
1868 - `types` (required)
1869
1870---
1871
1872### updateExpression
1873```javascript
1874t.updateExpression(operator, argument, prefix)
1875```
1876
1877See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`.
1878
1879Aliases: `Expression`
1880
1881 - `operator`: `'++' | '--'` (required)
1882 - `argument`: `Expression` (required)
1883 - `prefix`: `boolean` (default: `false`)
1884
1885---
1886
1887### variableDeclaration
1888```javascript
1889t.variableDeclaration(kind, declarations)
1890```
1891
1892See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`.
1893
1894Aliases: `Statement`, `Declaration`
1895
1896 - `kind`: `"var" | "let" | "const"` (required)
1897 - `declarations`: `Array<VariableDeclarator>` (required)
1898
1899---
1900
1901### variableDeclarator
1902```javascript
1903t.variableDeclarator(id, init)
1904```
1905
1906See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`.
1907
1908 - `id`: `LVal` (required)
1909 - `init`: `Expression` (default: `null`)
1910
1911---
1912
1913### voidTypeAnnotation
1914```javascript
1915t.voidTypeAnnotation()
1916```
1917
1918See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`.
1919
1920Aliases: `Flow`, `FlowBaseAnnotation`
1921
1922
1923---
1924
1925### whileStatement
1926```javascript
1927t.whileStatement(test, body)
1928```
1929
1930See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`.
1931
1932Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
1933
1934 - `test`: `Expression` (required)
1935 - `body`: `BlockStatement | Statement` (required)
1936
1937---
1938
1939### withStatement
1940```javascript
1941t.withStatement(object, body)
1942```
1943
1944See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`.
1945
1946Aliases: `Statement`
1947
1948 - `object` (required)
1949 - `body`: `BlockStatement | Statement` (required)
1950
1951---
1952
1953### yieldExpression
1954```javascript
1955t.yieldExpression(argument, delegate)
1956```
1957
1958See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`.
1959
1960Aliases: `Expression`, `Terminatorless`
1961
1962 - `argument`: `Expression` (default: `null`)
1963 - `delegate`: `boolean` (default: `false`)
1964
1965---
1966
1967
1968<!-- end generated section -->
1969