UNPKG

39.7 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### existsTypeAnnotation
579```javascript
580t.existsTypeAnnotation()
581```
582
583See also `t.isExistsTypeAnnotation(node, opts)` and `t.assertExistsTypeAnnotation(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### forInStatement
698```javascript
699t.forInStatement(left, right, body)
700```
701
702See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(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### forOfStatement
713```javascript
714t.forOfStatement(left, right, body)
715```
716
717See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(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 - `await`: `boolean` (default: `false`)
725
726---
727
728### forStatement
729```javascript
730t.forStatement(init, test, update, body)
731```
732
733See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`.
734
735Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`
736
737 - `init`: `VariableDeclaration | Expression` (default: `null`)
738 - `test`: `Expression` (default: `null`)
739 - `update`: `Expression` (default: `null`)
740 - `body`: `Statement` (required)
741
742---
743
744### functionDeclaration
745```javascript
746t.functionDeclaration(id, params, body, generator, async)
747```
748
749See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`.
750
751Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration`
752
753 - `id`: `Identifier` (required)
754 - `params`: `Array<LVal>` (required)
755 - `body`: `BlockStatement` (required)
756 - `generator`: `boolean` (default: `false`)
757 - `async`: `boolean` (default: `false`)
758 - `returnType` (default: `null`)
759 - `typeParameters` (default: `null`)
760
761---
762
763### functionExpression
764```javascript
765t.functionExpression(id, params, body, generator, async)
766```
767
768See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`.
769
770Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish`
771
772 - `id`: `Identifier` (default: `null`)
773 - `params`: `Array<LVal>` (required)
774 - `body`: `BlockStatement` (required)
775 - `generator`: `boolean` (default: `false`)
776 - `async`: `boolean` (default: `false`)
777 - `returnType` (default: `null`)
778 - `typeParameters` (default: `null`)
779
780---
781
782### functionTypeAnnotation
783```javascript
784t.functionTypeAnnotation(typeParameters, params, rest, returnType)
785```
786
787See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`.
788
789Aliases: `Flow`
790
791 - `typeParameters` (required)
792 - `params` (required)
793 - `rest` (required)
794 - `returnType` (required)
795
796---
797
798### functionTypeParam
799```javascript
800t.functionTypeParam(name, typeAnnotation)
801```
802
803See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`.
804
805Aliases: `Flow`
806
807 - `name` (required)
808 - `typeAnnotation` (required)
809
810---
811
812### genericTypeAnnotation
813```javascript
814t.genericTypeAnnotation(id, typeParameters)
815```
816
817See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`.
818
819Aliases: `Flow`
820
821 - `id` (required)
822 - `typeParameters` (required)
823
824---
825
826### identifier
827```javascript
828t.identifier(name)
829```
830
831See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`.
832
833Aliases: `Expression`, `LVal`
834
835 - `name``string` (required)
836 - `decorators`: `Array<Decorator>` (default: `null`)
837 - `typeAnnotation` (default: `null`)
838
839---
840
841### ifStatement
842```javascript
843t.ifStatement(test, consequent, alternate)
844```
845
846See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`.
847
848Aliases: `Statement`, `Conditional`
849
850 - `test`: `Expression` (required)
851 - `consequent`: `Statement` (required)
852 - `alternate`: `Statement` (default: `null`)
853
854---
855
856### import
857```javascript
858t.import()
859```
860
861See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
862
863Aliases: `Expression`
864
865
866---
867
868### importDeclaration
869```javascript
870t.importDeclaration(specifiers, source)
871```
872
873See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`.
874
875Aliases: `Statement`, `Declaration`, `ModuleDeclaration`
876
877 - `specifiers`: `Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>` (required)
878 - `source`: `StringLiteral` (required)
879
880---
881
882### importDefaultSpecifier
883```javascript
884t.importDefaultSpecifier(local)
885```
886
887See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`.
888
889Aliases: `ModuleSpecifier`
890
891 - `local`: `Identifier` (required)
892
893---
894
895### importNamespaceSpecifier
896```javascript
897t.importNamespaceSpecifier(local)
898```
899
900See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`.
901
902Aliases: `ModuleSpecifier`
903
904 - `local`: `Identifier` (required)
905
906---
907
908### importSpecifier
909```javascript
910t.importSpecifier(local, imported)
911```
912
913See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`.
914
915Aliases: `ModuleSpecifier`
916
917 - `local`: `Identifier` (required)
918 - `imported`: `Identifier` (required)
919 - `importKind`: `null | 'type' | 'typeof'` (default: `null`)
920
921---
922
923### interfaceDeclaration
924```javascript
925t.interfaceDeclaration(id, typeParameters, extends, body)
926```
927
928See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`.
929
930Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
931
932 - `id` (required)
933 - `typeParameters` (required)
934 - `extends` (required)
935 - `body` (required)
936
937---
938
939### interfaceExtends
940```javascript
941t.interfaceExtends(id, typeParameters)
942```
943
944See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`.
945
946Aliases: `Flow`
947
948 - `id` (required)
949 - `typeParameters` (required)
950
951---
952
953### intersectionTypeAnnotation
954```javascript
955t.intersectionTypeAnnotation(types)
956```
957
958See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`.
959
960Aliases: `Flow`
961
962 - `types` (required)
963
964---
965
966### jSXAttribute
967```javascript
968t.jSXAttribute(name, value)
969```
970
971See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`.
972
973Aliases: `JSX`, `Immutable`
974
975 - `name`: `JSXIdentifier | JSXNamespacedName` (required)
976 - `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`)
977
978---
979
980### jSXClosingElement
981```javascript
982t.jSXClosingElement(name)
983```
984
985See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`.
986
987Aliases: `JSX`, `Immutable`
988
989 - `name`: `JSXIdentifier | JSXMemberExpression` (required)
990
991---
992
993### jSXElement
994```javascript
995t.jSXElement(openingElement, closingElement, children, selfClosing)
996```
997
998See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`.
999
1000Aliases: `JSX`, `Immutable`, `Expression`
1001
1002 - `openingElement`: `JSXOpeningElement` (required)
1003 - `closingElement`: `JSXClosingElement` (default: `null`)
1004 - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement>` (required)
1005 - `selfClosing` (required)
1006
1007---
1008
1009### jSXEmptyExpression
1010```javascript
1011t.jSXEmptyExpression()
1012```
1013
1014See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`.
1015
1016Aliases: `JSX`, `Expression`
1017
1018
1019---
1020
1021### jSXExpressionContainer
1022```javascript
1023t.jSXExpressionContainer(expression)
1024```
1025
1026See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`.
1027
1028Aliases: `JSX`, `Immutable`
1029
1030 - `expression`: `Expression` (required)
1031
1032---
1033
1034### jSXIdentifier
1035```javascript
1036t.jSXIdentifier(name)
1037```
1038
1039See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`.
1040
1041Aliases: `JSX`, `Expression`
1042
1043 - `name`: `string` (required)
1044
1045---
1046
1047### jSXMemberExpression
1048```javascript
1049t.jSXMemberExpression(object, property)
1050```
1051
1052See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`.
1053
1054Aliases: `JSX`, `Expression`
1055
1056 - `object`: `JSXMemberExpression | JSXIdentifier` (required)
1057 - `property`: `JSXIdentifier` (required)
1058
1059---
1060
1061### jSXNamespacedName
1062```javascript
1063t.jSXNamespacedName(namespace, name)
1064```
1065
1066See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`.
1067
1068Aliases: `JSX`
1069
1070 - `namespace`: `JSXIdentifier` (required)
1071 - `name`: `JSXIdentifier` (required)
1072
1073---
1074
1075### jSXOpeningElement
1076```javascript
1077t.jSXOpeningElement(name, attributes, selfClosing)
1078```
1079
1080See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`.
1081
1082Aliases: `JSX`, `Immutable`
1083
1084 - `name`: `JSXIdentifier | JSXMemberExpression` (required)
1085 - `attributes`: `Array<JSXAttribute | JSXSpreadAttribute>` (required)
1086 - `selfClosing`: `boolean` (default: `false`)
1087
1088---
1089
1090### jSXSpreadAttribute
1091```javascript
1092t.jSXSpreadAttribute(argument)
1093```
1094
1095See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`.
1096
1097Aliases: `JSX`
1098
1099 - `argument`: `Expression` (required)
1100
1101---
1102
1103### jSXSpreadChild
1104```javascript
1105t.jSXSpreadChild(expression)
1106```
1107
1108See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
1109
1110Aliases: `JSX`, `Immutable`
1111
1112 - `expression`: `Expression` (required)
1113
1114---
1115
1116### jSXText
1117```javascript
1118t.jSXText(value)
1119```
1120
1121See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`.
1122
1123Aliases: `JSX`, `Immutable`
1124
1125 - `value`: `string` (required)
1126
1127---
1128
1129### labeledStatement
1130```javascript
1131t.labeledStatement(label, body)
1132```
1133
1134See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`.
1135
1136Aliases: `Statement`
1137
1138 - `label`: `Identifier` (required)
1139 - `body`: `Statement` (required)
1140
1141---
1142
1143### logicalExpression
1144```javascript
1145t.logicalExpression(operator, left, right)
1146```
1147
1148See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`.
1149
1150Aliases: `Binary`, `Expression`
1151
1152 - `operator`: `'||' | '&&'` (required)
1153 - `left`: `Expression` (required)
1154 - `right`: `Expression` (required)
1155
1156---
1157
1158### memberExpression
1159```javascript
1160t.memberExpression(object, property, computed)
1161```
1162
1163See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`.
1164
1165Aliases: `Expression`, `LVal`
1166
1167 - `object`: `Expression` (required)
1168 - `property`if computed then `Expression` else `Identifier` (required)
1169 - `computed`: `boolean` (default: `false`)
1170
1171---
1172
1173### metaProperty
1174```javascript
1175t.metaProperty(meta, property)
1176```
1177
1178See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`.
1179
1180Aliases: `Expression`
1181
1182 - `meta`: `string` (required)
1183 - `property`: `string` (required)
1184
1185---
1186
1187### mixedTypeAnnotation
1188```javascript
1189t.mixedTypeAnnotation()
1190```
1191
1192See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`.
1193
1194Aliases: `Flow`, `FlowBaseAnnotation`
1195
1196
1197---
1198
1199### newExpression
1200```javascript
1201t.newExpression(callee, arguments)
1202```
1203
1204See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`.
1205
1206Aliases: `Expression`
1207
1208 - `callee`: `Expression` (required)
1209 - `arguments`: `Array<Expression | SpreadElement>` (required)
1210
1211---
1212
1213### noop
1214```javascript
1215t.noop()
1216```
1217
1218See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`.
1219
1220
1221---
1222
1223### nullLiteral
1224```javascript
1225t.nullLiteral()
1226```
1227
1228See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`.
1229
1230Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1231
1232
1233---
1234
1235### nullLiteralTypeAnnotation
1236```javascript
1237t.nullLiteralTypeAnnotation()
1238```
1239
1240See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`.
1241
1242Aliases: `Flow`, `FlowBaseAnnotation`
1243
1244
1245---
1246
1247### nullableTypeAnnotation
1248```javascript
1249t.nullableTypeAnnotation(typeAnnotation)
1250```
1251
1252See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`.
1253
1254Aliases: `Flow`
1255
1256 - `typeAnnotation` (required)
1257
1258---
1259
1260### numberLiteralTypeAnnotation
1261```javascript
1262t.numberLiteralTypeAnnotation()
1263```
1264
1265See also `t.isNumberLiteralTypeAnnotation(node, opts)` and `t.assertNumberLiteralTypeAnnotation(node, opts)`.
1266
1267Aliases: `Flow`
1268
1269
1270---
1271
1272### numberTypeAnnotation
1273```javascript
1274t.numberTypeAnnotation()
1275```
1276
1277See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`.
1278
1279Aliases: `Flow`, `FlowBaseAnnotation`
1280
1281
1282---
1283
1284### numericLiteral
1285```javascript
1286t.numericLiteral(value)
1287```
1288
1289See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`.
1290
1291Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1292
1293 - `value`: `number` (required)
1294
1295---
1296
1297### objectExpression
1298```javascript
1299t.objectExpression(properties)
1300```
1301
1302See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`.
1303
1304Aliases: `Expression`
1305
1306 - `properties`: `Array<ObjectMethod | ObjectProperty | SpreadElement>` (required)
1307
1308---
1309
1310### objectMethod
1311```javascript
1312t.objectMethod(kind, key, params, body, computed)
1313```
1314
1315See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`.
1316
1317Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember`
1318
1319 - `kind`: `"method" | "get" | "set"` (default: `'method'`)
1320 - `key`if computed then `Expression` else `Identifier | Literal` (required)
1321 - `params` (required)
1322 - `body`: `BlockStatement` (required)
1323 - `computed`: `boolean` (default: `false`)
1324 - `async`: `boolean` (default: `false`)
1325 - `decorators`: `Array<Decorator>` (default: `null`)
1326 - `generator`: `boolean` (default: `false`)
1327 - `returnType` (default: `null`)
1328 - `typeParameters` (default: `null`)
1329
1330---
1331
1332### objectPattern
1333```javascript
1334t.objectPattern(properties, typeAnnotation)
1335```
1336
1337See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`.
1338
1339Aliases: `Pattern`, `LVal`
1340
1341 - `properties`: `Array<RestElement | Property>` (required)
1342 - `typeAnnotation` (required)
1343 - `decorators`: `Array<Decorator>` (default: `null`)
1344
1345---
1346
1347### objectProperty
1348```javascript
1349t.objectProperty(key, value, computed, shorthand, decorators)
1350```
1351
1352See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`.
1353
1354Aliases: `UserWhitespacable`, `Property`, `ObjectMember`
1355
1356 - `key`if computed then `Expression` else `Identifier | Literal` (required)
1357 - `value`: `Expression` (required)
1358 - `computed`: `boolean` (default: `false`)
1359 - `shorthand`: `boolean` (default: `false`)
1360 - `decorators`: `Array<Decorator>` (default: `null`)
1361
1362---
1363
1364### objectTypeAnnotation
1365```javascript
1366t.objectTypeAnnotation(properties, indexers, callProperties)
1367```
1368
1369See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`.
1370
1371Aliases: `Flow`
1372
1373 - `properties` (required)
1374 - `indexers` (required)
1375 - `callProperties` (required)
1376
1377---
1378
1379### objectTypeCallProperty
1380```javascript
1381t.objectTypeCallProperty(value)
1382```
1383
1384See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`.
1385
1386Aliases: `Flow`, `UserWhitespacable`
1387
1388 - `value` (required)
1389
1390---
1391
1392### objectTypeIndexer
1393```javascript
1394t.objectTypeIndexer(id, key, value)
1395```
1396
1397See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`.
1398
1399Aliases: `Flow`, `UserWhitespacable`
1400
1401 - `id` (required)
1402 - `key` (required)
1403 - `value` (required)
1404
1405---
1406
1407### objectTypeProperty
1408```javascript
1409t.objectTypeProperty(key, value)
1410```
1411
1412See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`.
1413
1414Aliases: `Flow`, `UserWhitespacable`
1415
1416 - `key` (required)
1417 - `value` (required)
1418
1419---
1420
1421### parenthesizedExpression
1422```javascript
1423t.parenthesizedExpression(expression)
1424```
1425
1426See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`.
1427
1428Aliases: `Expression`, `ExpressionWrapper`
1429
1430 - `expression`: `Expression` (required)
1431
1432---
1433
1434### program
1435```javascript
1436t.program(body, directives)
1437```
1438
1439See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`.
1440
1441Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent`
1442
1443 - `body`: `Array<Statement>` (required)
1444 - `directives`: `Array<Directive>` (default: `[]`)
1445
1446---
1447
1448### qualifiedTypeIdentifier
1449```javascript
1450t.qualifiedTypeIdentifier(id, qualification)
1451```
1452
1453See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`.
1454
1455Aliases: `Flow`
1456
1457 - `id` (required)
1458 - `qualification` (required)
1459
1460---
1461
1462### regExpLiteral
1463```javascript
1464t.regExpLiteral(pattern, flags)
1465```
1466
1467See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`.
1468
1469Aliases: `Expression`, `Literal`
1470
1471 - `pattern`: `string` (required)
1472 - `flags`: `string` (default: `''`)
1473
1474---
1475
1476### restElement
1477```javascript
1478t.restElement(argument, typeAnnotation)
1479```
1480
1481See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`.
1482
1483Aliases: `LVal`
1484
1485 - `argument`: `LVal` (required)
1486 - `typeAnnotation` (required)
1487 - `decorators`: `Array<Decorator>` (default: `null`)
1488
1489---
1490
1491### returnStatement
1492```javascript
1493t.returnStatement(argument)
1494```
1495
1496See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`.
1497
1498Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
1499
1500 - `argument`: `Expression` (default: `null`)
1501
1502---
1503
1504### sequenceExpression
1505```javascript
1506t.sequenceExpression(expressions)
1507```
1508
1509See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`.
1510
1511Aliases: `Expression`
1512
1513 - `expressions`: `Array<Expression>` (required)
1514
1515---
1516
1517### spreadElement
1518```javascript
1519t.spreadElement(argument)
1520```
1521
1522See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`.
1523
1524Aliases: `UnaryLike`
1525
1526 - `argument`: `Expression` (required)
1527
1528---
1529
1530### stringLiteral
1531```javascript
1532t.stringLiteral(value)
1533```
1534
1535See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`.
1536
1537Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
1538
1539 - `value`: `string` (required)
1540
1541---
1542
1543### stringLiteralTypeAnnotation
1544```javascript
1545t.stringLiteralTypeAnnotation()
1546```
1547
1548See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`.
1549
1550Aliases: `Flow`
1551
1552
1553---
1554
1555### stringTypeAnnotation
1556```javascript
1557t.stringTypeAnnotation()
1558```
1559
1560See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`.
1561
1562Aliases: `Flow`, `FlowBaseAnnotation`
1563
1564
1565---
1566
1567### super
1568```javascript
1569t.super()
1570```
1571
1572See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`.
1573
1574Aliases: `Expression`
1575
1576
1577---
1578
1579### switchCase
1580```javascript
1581t.switchCase(test, consequent)
1582```
1583
1584See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`.
1585
1586 - `test`: `Expression` (default: `null`)
1587 - `consequent`: `Array<Statement>` (required)
1588
1589---
1590
1591### switchStatement
1592```javascript
1593t.switchStatement(discriminant, cases)
1594```
1595
1596See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`.
1597
1598Aliases: `Statement`, `BlockParent`, `Scopable`
1599
1600 - `discriminant`: `Expression` (required)
1601 - `cases`: `Array<SwitchCase>` (required)
1602
1603---
1604
1605### taggedTemplateExpression
1606```javascript
1607t.taggedTemplateExpression(tag, quasi)
1608```
1609
1610See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`.
1611
1612Aliases: `Expression`
1613
1614 - `tag`: `Expression` (required)
1615 - `quasi`: `TemplateLiteral` (required)
1616
1617---
1618
1619### templateElement
1620```javascript
1621t.templateElement(value, tail)
1622```
1623
1624See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`.
1625
1626 - `value` (required)
1627 - `tail`: `boolean` (default: `false`)
1628
1629---
1630
1631### templateLiteral
1632```javascript
1633t.templateLiteral(quasis, expressions)
1634```
1635
1636See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`.
1637
1638Aliases: `Expression`, `Literal`
1639
1640 - `quasis`: `Array<TemplateElement>` (required)
1641 - `expressions`: `Array<Expression>` (required)
1642
1643---
1644
1645### thisExpression
1646```javascript
1647t.thisExpression()
1648```
1649
1650See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`.
1651
1652Aliases: `Expression`
1653
1654
1655---
1656
1657### thisTypeAnnotation
1658```javascript
1659t.thisTypeAnnotation()
1660```
1661
1662See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`.
1663
1664Aliases: `Flow`, `FlowBaseAnnotation`
1665
1666
1667---
1668
1669### throwStatement
1670```javascript
1671t.throwStatement(argument)
1672```
1673
1674See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`.
1675
1676Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
1677
1678 - `argument`: `Expression` (required)
1679
1680---
1681
1682### tryStatement
1683```javascript
1684t.tryStatement(block, handler, finalizer)
1685```
1686
1687See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`.
1688
1689Aliases: `Statement`
1690
1691 - `block` (required)
1692 - `handler` (default: `null`)
1693 - `finalizer`: `BlockStatement` (default: `null`)
1694 - `body`: `BlockStatement` (default: `null`)
1695
1696---
1697
1698### tupleTypeAnnotation
1699```javascript
1700t.tupleTypeAnnotation(types)
1701```
1702
1703See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`.
1704
1705Aliases: `Flow`
1706
1707 - `types` (required)
1708
1709---
1710
1711### typeAlias
1712```javascript
1713t.typeAlias(id, typeParameters, right)
1714```
1715
1716See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`.
1717
1718Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
1719
1720 - `id` (required)
1721 - `typeParameters` (required)
1722 - `right` (required)
1723
1724---
1725
1726### typeAnnotation
1727```javascript
1728t.typeAnnotation(typeAnnotation)
1729```
1730
1731See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`.
1732
1733Aliases: `Flow`
1734
1735 - `typeAnnotation` (required)
1736
1737---
1738
1739### typeCastExpression
1740```javascript
1741t.typeCastExpression(expression, typeAnnotation)
1742```
1743
1744See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`.
1745
1746Aliases: `Flow`, `ExpressionWrapper`, `Expression`
1747
1748 - `expression` (required)
1749 - `typeAnnotation` (required)
1750
1751---
1752
1753### typeParameter
1754```javascript
1755t.typeParameter(bound)
1756```
1757
1758See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`.
1759
1760Aliases: `Flow`
1761
1762 - `bound` (required)
1763
1764---
1765
1766### typeParameterDeclaration
1767```javascript
1768t.typeParameterDeclaration(params)
1769```
1770
1771See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`.
1772
1773Aliases: `Flow`
1774
1775 - `params` (required)
1776
1777---
1778
1779### typeParameterInstantiation
1780```javascript
1781t.typeParameterInstantiation(params)
1782```
1783
1784See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`.
1785
1786Aliases: `Flow`
1787
1788 - `params` (required)
1789
1790---
1791
1792### typeofTypeAnnotation
1793```javascript
1794t.typeofTypeAnnotation(argument)
1795```
1796
1797See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`.
1798
1799Aliases: `Flow`
1800
1801 - `argument` (required)
1802
1803---
1804
1805### unaryExpression
1806```javascript
1807t.unaryExpression(operator, argument, prefix)
1808```
1809
1810See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`.
1811
1812Aliases: `UnaryLike`, `Expression`
1813
1814 - `operator`: `'void' | 'delete' | '!' | '+' | '-' | '++' | '--' | '~' | 'typeof'` (required)
1815 - `argument`: `Expression` (required)
1816 - `prefix`: `boolean` (default: `true`)
1817
1818---
1819
1820### unionTypeAnnotation
1821```javascript
1822t.unionTypeAnnotation(types)
1823```
1824
1825See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`.
1826
1827Aliases: `Flow`
1828
1829 - `types` (required)
1830
1831---
1832
1833### updateExpression
1834```javascript
1835t.updateExpression(operator, argument, prefix)
1836```
1837
1838See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`.
1839
1840Aliases: `Expression`
1841
1842 - `operator`: `'++' | '--'` (required)
1843 - `argument`: `Expression` (required)
1844 - `prefix`: `boolean` (default: `false`)
1845
1846---
1847
1848### variableDeclaration
1849```javascript
1850t.variableDeclaration(kind, declarations)
1851```
1852
1853See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`.
1854
1855Aliases: `Statement`, `Declaration`
1856
1857 - `kind`: `"var" | "let" | "const"` (required)
1858 - `declarations`: `Array<VariableDeclarator>` (required)
1859
1860---
1861
1862### variableDeclarator
1863```javascript
1864t.variableDeclarator(id, init)
1865```
1866
1867See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`.
1868
1869 - `id`: `LVal` (required)
1870 - `init`: `Expression` (default: `null`)
1871
1872---
1873
1874### voidTypeAnnotation
1875```javascript
1876t.voidTypeAnnotation()
1877```
1878
1879See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`.
1880
1881Aliases: `Flow`, `FlowBaseAnnotation`
1882
1883
1884---
1885
1886### whileStatement
1887```javascript
1888t.whileStatement(test, body)
1889```
1890
1891See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`.
1892
1893Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
1894
1895 - `test`: `Expression` (required)
1896 - `body`: `BlockStatement | Statement` (required)
1897
1898---
1899
1900### withStatement
1901```javascript
1902t.withStatement(object, body)
1903```
1904
1905See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`.
1906
1907Aliases: `Statement`
1908
1909 - `object` (required)
1910 - `body`: `BlockStatement | Statement` (required)
1911
1912---
1913
1914### yieldExpression
1915```javascript
1916t.yieldExpression(argument, delegate)
1917```
1918
1919See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`.
1920
1921Aliases: `Expression`, `Terminatorless`
1922
1923 - `argument`: `Expression` (default: `null`)
1924 - `delegate`: `boolean` (default: `false`)
1925
1926---
1927
1928
1929<!-- end generated section -->
1930