babel-types

This module contains methods for building ASTs manually and for checking the types of AST nodes.

Install

npm install --save-dev babel-types

API

anyTypeAnnotation

t.anyTypeAnnotation()

See also t.isAnyTypeAnnotation(node, opts) and t.assertAnyTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


arrayExpression

t.arrayExpression(elements)

See also t.isArrayExpression(node, opts) and t.assertArrayExpression(node, opts).

Aliases: Expression


arrayPattern

t.arrayPattern(elements, typeAnnotation)

See also t.isArrayPattern(node, opts) and t.assertArrayPattern(node, opts).

Aliases: Pattern, LVal


arrayTypeAnnotation

t.arrayTypeAnnotation(elementType)

See also t.isArrayTypeAnnotation(node, opts) and t.assertArrayTypeAnnotation(node, opts).

Aliases: Flow


arrowFunctionExpression

t.arrowFunctionExpression(params, body, async)

See also t.isArrowFunctionExpression(node, opts) and t.assertArrowFunctionExpression(node, opts).

Aliases: Scopable, Function, BlockParent, FunctionParent, Expression, Pureish


assignmentExpression

t.assignmentExpression(operator, left, right)

See also t.isAssignmentExpression(node, opts) and t.assertAssignmentExpression(node, opts).

Aliases: Expression


assignmentPattern

t.assignmentPattern(left, right)

See also t.isAssignmentPattern(node, opts) and t.assertAssignmentPattern(node, opts).

Aliases: Pattern, LVal


awaitExpression

t.awaitExpression(argument)

See also t.isAwaitExpression(node, opts) and t.assertAwaitExpression(node, opts).

Aliases: Expression, Terminatorless


binaryExpression

t.binaryExpression(operator, left, right)

See also t.isBinaryExpression(node, opts) and t.assertBinaryExpression(node, opts).

Aliases: Binary, Expression


bindExpression

t.bindExpression(object, callee)

See also t.isBindExpression(node, opts) and t.assertBindExpression(node, opts).

Aliases: Expression


blockStatement

t.blockStatement(body, directives)

See also t.isBlockStatement(node, opts) and t.assertBlockStatement(node, opts).

Aliases: Scopable, BlockParent, Block, Statement


booleanLiteral

t.booleanLiteral(value)

See also t.isBooleanLiteral(node, opts) and t.assertBooleanLiteral(node, opts).

Aliases: Expression, Pureish, Literal, Immutable


booleanLiteralTypeAnnotation

t.booleanLiteralTypeAnnotation()

See also t.isBooleanLiteralTypeAnnotation(node, opts) and t.assertBooleanLiteralTypeAnnotation(node, opts).

Aliases: Flow


booleanTypeAnnotation

t.booleanTypeAnnotation()

See also t.isBooleanTypeAnnotation(node, opts) and t.assertBooleanTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


breakStatement

t.breakStatement(label)

See also t.isBreakStatement(node, opts) and t.assertBreakStatement(node, opts).

Aliases: Statement, Terminatorless, CompletionStatement


callExpression

t.callExpression(callee, arguments)

See also t.isCallExpression(node, opts) and t.assertCallExpression(node, opts).

Aliases: Expression


catchClause

t.catchClause(param, body)

See also t.isCatchClause(node, opts) and t.assertCatchClause(node, opts).

Aliases: Scopable


classBody

t.classBody(body)

See also t.isClassBody(node, opts) and t.assertClassBody(node, opts).


classDeclaration

t.classDeclaration(id, superClass, body, decorators)

See also t.isClassDeclaration(node, opts) and t.assertClassDeclaration(node, opts).

Aliases: Scopable, Class, Statement, Declaration, Pureish


classExpression

t.classExpression(id, superClass, body, decorators)

See also t.isClassExpression(node, opts) and t.assertClassExpression(node, opts).

Aliases: Scopable, Class, Expression, Pureish


classImplements

t.classImplements(id, typeParameters)

See also t.isClassImplements(node, opts) and t.assertClassImplements(node, opts).

Aliases: Flow


classMethod

t.classMethod(kind, key, params, body, computed, static)

See also t.isClassMethod(node, opts) and t.assertClassMethod(node, opts).

Aliases: Function, Scopable, BlockParent, FunctionParent, Method


classProperty

t.classProperty(key, value, typeAnnotation, decorators, computed)

See also t.isClassProperty(node, opts) and t.assertClassProperty(node, opts).

Aliases: Property


conditionalExpression

t.conditionalExpression(test, consequent, alternate)

See also t.isConditionalExpression(node, opts) and t.assertConditionalExpression(node, opts).

Aliases: Expression, Conditional


continueStatement

t.continueStatement(label)

See also t.isContinueStatement(node, opts) and t.assertContinueStatement(node, opts).

Aliases: Statement, Terminatorless, CompletionStatement


debuggerStatement

t.debuggerStatement()

See also t.isDebuggerStatement(node, opts) and t.assertDebuggerStatement(node, opts).

Aliases: Statement


declareClass

t.declareClass(id, typeParameters, extends, body)

See also t.isDeclareClass(node, opts) and t.assertDeclareClass(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareFunction

t.declareFunction(id)

See also t.isDeclareFunction(node, opts) and t.assertDeclareFunction(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareInterface

t.declareInterface(id, typeParameters, extends, body)

See also t.isDeclareInterface(node, opts) and t.assertDeclareInterface(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareModule

t.declareModule(id, body)

See also t.isDeclareModule(node, opts) and t.assertDeclareModule(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareModuleExports

t.declareModuleExports(typeAnnotation)

See also t.isDeclareModuleExports(node, opts) and t.assertDeclareModuleExports(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareTypeAlias

t.declareTypeAlias(id, typeParameters, right)

See also t.isDeclareTypeAlias(node, opts) and t.assertDeclareTypeAlias(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


declareVariable

t.declareVariable(id)

See also t.isDeclareVariable(node, opts) and t.assertDeclareVariable(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


decorator

t.decorator(expression)

See also t.isDecorator(node, opts) and t.assertDecorator(node, opts).


directive

t.directive(value)

See also t.isDirective(node, opts) and t.assertDirective(node, opts).


directiveLiteral

t.directiveLiteral(value)

See also t.isDirectiveLiteral(node, opts) and t.assertDirectiveLiteral(node, opts).


doExpression

t.doExpression(body)

See also t.isDoExpression(node, opts) and t.assertDoExpression(node, opts).

Aliases: Expression


doWhileStatement

t.doWhileStatement(test, body)

See also t.isDoWhileStatement(node, opts) and t.assertDoWhileStatement(node, opts).

Aliases: Statement, BlockParent, Loop, While, Scopable


emptyStatement

t.emptyStatement()

See also t.isEmptyStatement(node, opts) and t.assertEmptyStatement(node, opts).

Aliases: Statement


emptyTypeAnnotation

t.emptyTypeAnnotation()

See also t.isEmptyTypeAnnotation(node, opts) and t.assertEmptyTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


existentialTypeParam

t.existentialTypeParam()

See also t.isExistentialTypeParam(node, opts) and t.assertExistentialTypeParam(node, opts).

Aliases: Flow


exportAllDeclaration

t.exportAllDeclaration(source)

See also t.isExportAllDeclaration(node, opts) and t.assertExportAllDeclaration(node, opts).

Aliases: Statement, Declaration, ModuleDeclaration, ExportDeclaration


exportDefaultDeclaration

t.exportDefaultDeclaration(declaration)

See also t.isExportDefaultDeclaration(node, opts) and t.assertExportDefaultDeclaration(node, opts).

Aliases: Statement, Declaration, ModuleDeclaration, ExportDeclaration


exportDefaultSpecifier

t.exportDefaultSpecifier(exported)

See also t.isExportDefaultSpecifier(node, opts) and t.assertExportDefaultSpecifier(node, opts).

Aliases: ModuleSpecifier


exportNamedDeclaration

t.exportNamedDeclaration(declaration, specifiers, source)

See also t.isExportNamedDeclaration(node, opts) and t.assertExportNamedDeclaration(node, opts).

Aliases: Statement, Declaration, ModuleDeclaration, ExportDeclaration


exportNamespaceSpecifier

t.exportNamespaceSpecifier(exported)

See also t.isExportNamespaceSpecifier(node, opts) and t.assertExportNamespaceSpecifier(node, opts).

Aliases: ModuleSpecifier


exportSpecifier

t.exportSpecifier(local, exported)

See also t.isExportSpecifier(node, opts) and t.assertExportSpecifier(node, opts).

Aliases: ModuleSpecifier


expressionStatement

t.expressionStatement(expression)

See also t.isExpressionStatement(node, opts) and t.assertExpressionStatement(node, opts).

Aliases: Statement, ExpressionWrapper


file

t.file(program, comments, tokens)

See also t.isFile(node, opts) and t.assertFile(node, opts).


forAwaitStatement

t.forAwaitStatement(left, right, body)

See also t.isForAwaitStatement(node, opts) and t.assertForAwaitStatement(node, opts).

Aliases: Scopable, Statement, For, BlockParent, Loop, ForXStatement


forInStatement

t.forInStatement(left, right, body)

See also t.isForInStatement(node, opts) and t.assertForInStatement(node, opts).

Aliases: Scopable, Statement, For, BlockParent, Loop, ForXStatement


forOfStatement

t.forOfStatement(left, right, body)

See also t.isForOfStatement(node, opts) and t.assertForOfStatement(node, opts).

Aliases: Scopable, Statement, For, BlockParent, Loop, ForXStatement


forStatement

t.forStatement(init, test, update, body)

See also t.isForStatement(node, opts) and t.assertForStatement(node, opts).

Aliases: Scopable, Statement, For, BlockParent, Loop


functionDeclaration

t.functionDeclaration(id, params, body, generator, async)

See also t.isFunctionDeclaration(node, opts) and t.assertFunctionDeclaration(node, opts).

Aliases: Scopable, Function, BlockParent, FunctionParent, Statement, Pureish, Declaration


functionExpression

t.functionExpression(id, params, body, generator, async)

See also t.isFunctionExpression(node, opts) and t.assertFunctionExpression(node, opts).

Aliases: Scopable, Function, BlockParent, FunctionParent, Expression, Pureish


functionTypeAnnotation

t.functionTypeAnnotation(typeParameters, params, rest, returnType)

See also t.isFunctionTypeAnnotation(node, opts) and t.assertFunctionTypeAnnotation(node, opts).

Aliases: Flow


functionTypeParam

t.functionTypeParam(name, typeAnnotation)

See also t.isFunctionTypeParam(node, opts) and t.assertFunctionTypeParam(node, opts).

Aliases: Flow


genericTypeAnnotation

t.genericTypeAnnotation(id, typeParameters)

See also t.isGenericTypeAnnotation(node, opts) and t.assertGenericTypeAnnotation(node, opts).

Aliases: Flow


identifier

t.identifier(name)

See also t.isIdentifier(node, opts) and t.assertIdentifier(node, opts).

Aliases: Expression, LVal


ifStatement

t.ifStatement(test, consequent, alternate)

See also t.isIfStatement(node, opts) and t.assertIfStatement(node, opts).

Aliases: Statement, Conditional


import

t.import()

See also t.isImport(node, opts) and t.assertImport(node, opts).

Aliases: Expression


importDeclaration

t.importDeclaration(specifiers, source)

See also t.isImportDeclaration(node, opts) and t.assertImportDeclaration(node, opts).

Aliases: Statement, Declaration, ModuleDeclaration


importDefaultSpecifier

t.importDefaultSpecifier(local)

See also t.isImportDefaultSpecifier(node, opts) and t.assertImportDefaultSpecifier(node, opts).

Aliases: ModuleSpecifier


importNamespaceSpecifier

t.importNamespaceSpecifier(local)

See also t.isImportNamespaceSpecifier(node, opts) and t.assertImportNamespaceSpecifier(node, opts).

Aliases: ModuleSpecifier


importSpecifier

t.importSpecifier(local, imported)

See also t.isImportSpecifier(node, opts) and t.assertImportSpecifier(node, opts).

Aliases: ModuleSpecifier


interfaceDeclaration

t.interfaceDeclaration(id, typeParameters, extends, body)

See also t.isInterfaceDeclaration(node, opts) and t.assertInterfaceDeclaration(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


interfaceExtends

t.interfaceExtends(id, typeParameters)

See also t.isInterfaceExtends(node, opts) and t.assertInterfaceExtends(node, opts).

Aliases: Flow


intersectionTypeAnnotation

t.intersectionTypeAnnotation(types)

See also t.isIntersectionTypeAnnotation(node, opts) and t.assertIntersectionTypeAnnotation(node, opts).

Aliases: Flow


jSXAttribute

t.jSXAttribute(name, value)

See also t.isJSXAttribute(node, opts) and t.assertJSXAttribute(node, opts).

Aliases: JSX, Immutable


jSXClosingElement

t.jSXClosingElement(name)

See also t.isJSXClosingElement(node, opts) and t.assertJSXClosingElement(node, opts).

Aliases: JSX, Immutable


jSXElement

t.jSXElement(openingElement, closingElement, children, selfClosing)

See also t.isJSXElement(node, opts) and t.assertJSXElement(node, opts).

Aliases: JSX, Immutable, Expression


jSXEmptyExpression

t.jSXEmptyExpression()

See also t.isJSXEmptyExpression(node, opts) and t.assertJSXEmptyExpression(node, opts).

Aliases: JSX, Expression


jSXExpressionContainer

t.jSXExpressionContainer(expression)

See also t.isJSXExpressionContainer(node, opts) and t.assertJSXExpressionContainer(node, opts).

Aliases: JSX, Immutable


jSXIdentifier

t.jSXIdentifier(name)

See also t.isJSXIdentifier(node, opts) and t.assertJSXIdentifier(node, opts).

Aliases: JSX, Expression


jSXMemberExpression

t.jSXMemberExpression(object, property)

See also t.isJSXMemberExpression(node, opts) and t.assertJSXMemberExpression(node, opts).

Aliases: JSX, Expression


jSXNamespacedName

t.jSXNamespacedName(namespace, name)

See also t.isJSXNamespacedName(node, opts) and t.assertJSXNamespacedName(node, opts).

Aliases: JSX


jSXOpeningElement

t.jSXOpeningElement(name, attributes, selfClosing)

See also t.isJSXOpeningElement(node, opts) and t.assertJSXOpeningElement(node, opts).

Aliases: JSX, Immutable


jSXSpreadAttribute

t.jSXSpreadAttribute(argument)

See also t.isJSXSpreadAttribute(node, opts) and t.assertJSXSpreadAttribute(node, opts).

Aliases: JSX


jSXSpreadChild

t.jSXSpreadChild(expression)

See also t.isJSXSpreadChild(node, opts) and t.assertJSXSpreadChild(node, opts).

Aliases: JSX, Immutable


jSXText

t.jSXText(value)

See also t.isJSXText(node, opts) and t.assertJSXText(node, opts).

Aliases: JSX, Immutable


labeledStatement

t.labeledStatement(label, body)

See also t.isLabeledStatement(node, opts) and t.assertLabeledStatement(node, opts).

Aliases: Statement


logicalExpression

t.logicalExpression(operator, left, right)

See also t.isLogicalExpression(node, opts) and t.assertLogicalExpression(node, opts).

Aliases: Binary, Expression


memberExpression

t.memberExpression(object, property, computed)

See also t.isMemberExpression(node, opts) and t.assertMemberExpression(node, opts).

Aliases: Expression, LVal


metaProperty

t.metaProperty(meta, property)

See also t.isMetaProperty(node, opts) and t.assertMetaProperty(node, opts).

Aliases: Expression


mixedTypeAnnotation

t.mixedTypeAnnotation()

See also t.isMixedTypeAnnotation(node, opts) and t.assertMixedTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


newExpression

t.newExpression(callee, arguments)

See also t.isNewExpression(node, opts) and t.assertNewExpression(node, opts).

Aliases: Expression


noop

t.noop()

See also t.isNoop(node, opts) and t.assertNoop(node, opts).


nullLiteral

t.nullLiteral()

See also t.isNullLiteral(node, opts) and t.assertNullLiteral(node, opts).

Aliases: Expression, Pureish, Literal, Immutable


nullLiteralTypeAnnotation

t.nullLiteralTypeAnnotation()

See also t.isNullLiteralTypeAnnotation(node, opts) and t.assertNullLiteralTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


nullableTypeAnnotation

t.nullableTypeAnnotation(typeAnnotation)

See also t.isNullableTypeAnnotation(node, opts) and t.assertNullableTypeAnnotation(node, opts).

Aliases: Flow


numberTypeAnnotation

t.numberTypeAnnotation()

See also t.isNumberTypeAnnotation(node, opts) and t.assertNumberTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


numericLiteral

t.numericLiteral(value)

See also t.isNumericLiteral(node, opts) and t.assertNumericLiteral(node, opts).

Aliases: Expression, Pureish, Literal, Immutable


numericLiteralTypeAnnotation

t.numericLiteralTypeAnnotation()

See also t.isNumericLiteralTypeAnnotation(node, opts) and t.assertNumericLiteralTypeAnnotation(node, opts).

Aliases: Flow


objectExpression

t.objectExpression(properties)

See also t.isObjectExpression(node, opts) and t.assertObjectExpression(node, opts).

Aliases: Expression


objectMethod

t.objectMethod(kind, key, params, body, computed)

See also t.isObjectMethod(node, opts) and t.assertObjectMethod(node, opts).

Aliases: UserWhitespacable, Function, Scopable, BlockParent, FunctionParent, Method, ObjectMember


objectPattern

t.objectPattern(properties, typeAnnotation)

See also t.isObjectPattern(node, opts) and t.assertObjectPattern(node, opts).

Aliases: Pattern, LVal


objectProperty

t.objectProperty(key, value, computed, shorthand, decorators)

See also t.isObjectProperty(node, opts) and t.assertObjectProperty(node, opts).

Aliases: UserWhitespacable, Property, ObjectMember


objectTypeAnnotation

t.objectTypeAnnotation(properties, indexers, callProperties)

See also t.isObjectTypeAnnotation(node, opts) and t.assertObjectTypeAnnotation(node, opts).

Aliases: Flow


objectTypeCallProperty

t.objectTypeCallProperty(value)

See also t.isObjectTypeCallProperty(node, opts) and t.assertObjectTypeCallProperty(node, opts).

Aliases: Flow, UserWhitespacable


objectTypeIndexer

t.objectTypeIndexer(id, key, value)

See also t.isObjectTypeIndexer(node, opts) and t.assertObjectTypeIndexer(node, opts).

Aliases: Flow, UserWhitespacable


objectTypeProperty

t.objectTypeProperty(key, value)

See also t.isObjectTypeProperty(node, opts) and t.assertObjectTypeProperty(node, opts).

Aliases: Flow, UserWhitespacable


objectTypeSpreadProperty

t.objectTypeSpreadProperty(argument)

See also t.isObjectTypeSpreadProperty(node, opts) and t.assertObjectTypeSpreadProperty(node, opts).

Aliases: Flow, UserWhitespacable


parenthesizedExpression

t.parenthesizedExpression(expression)

See also t.isParenthesizedExpression(node, opts) and t.assertParenthesizedExpression(node, opts).

Aliases: Expression, ExpressionWrapper


program

t.program(body, directives)

See also t.isProgram(node, opts) and t.assertProgram(node, opts).

Aliases: Scopable, BlockParent, Block, FunctionParent


qualifiedTypeIdentifier

t.qualifiedTypeIdentifier(id, qualification)

See also t.isQualifiedTypeIdentifier(node, opts) and t.assertQualifiedTypeIdentifier(node, opts).

Aliases: Flow


regExpLiteral

t.regExpLiteral(pattern, flags)

See also t.isRegExpLiteral(node, opts) and t.assertRegExpLiteral(node, opts).

Aliases: Expression, Literal


restElement

t.restElement(argument, typeAnnotation)

See also t.isRestElement(node, opts) and t.assertRestElement(node, opts).

Aliases: LVal


restProperty

t.restProperty(argument)

See also t.isRestProperty(node, opts) and t.assertRestProperty(node, opts).

Aliases: UnaryLike


returnStatement

t.returnStatement(argument)

See also t.isReturnStatement(node, opts) and t.assertReturnStatement(node, opts).

Aliases: Statement, Terminatorless, CompletionStatement


sequenceExpression

t.sequenceExpression(expressions)

See also t.isSequenceExpression(node, opts) and t.assertSequenceExpression(node, opts).

Aliases: Expression


spreadElement

t.spreadElement(argument)

See also t.isSpreadElement(node, opts) and t.assertSpreadElement(node, opts).

Aliases: UnaryLike


spreadProperty

t.spreadProperty(argument)

See also t.isSpreadProperty(node, opts) and t.assertSpreadProperty(node, opts).

Aliases: UnaryLike


stringLiteral

t.stringLiteral(value)

See also t.isStringLiteral(node, opts) and t.assertStringLiteral(node, opts).

Aliases: Expression, Pureish, Literal, Immutable


stringLiteralTypeAnnotation

t.stringLiteralTypeAnnotation()

See also t.isStringLiteralTypeAnnotation(node, opts) and t.assertStringLiteralTypeAnnotation(node, opts).

Aliases: Flow


stringTypeAnnotation

t.stringTypeAnnotation()

See also t.isStringTypeAnnotation(node, opts) and t.assertStringTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


super

t.super()

See also t.isSuper(node, opts) and t.assertSuper(node, opts).

Aliases: Expression


switchCase

t.switchCase(test, consequent)

See also t.isSwitchCase(node, opts) and t.assertSwitchCase(node, opts).


switchStatement

t.switchStatement(discriminant, cases)

See also t.isSwitchStatement(node, opts) and t.assertSwitchStatement(node, opts).

Aliases: Statement, BlockParent, Scopable


taggedTemplateExpression

t.taggedTemplateExpression(tag, quasi)

See also t.isTaggedTemplateExpression(node, opts) and t.assertTaggedTemplateExpression(node, opts).

Aliases: Expression


templateElement

t.templateElement(value, tail)

See also t.isTemplateElement(node, opts) and t.assertTemplateElement(node, opts).


templateLiteral

t.templateLiteral(quasis, expressions)

See also t.isTemplateLiteral(node, opts) and t.assertTemplateLiteral(node, opts).

Aliases: Expression, Literal


thisExpression

t.thisExpression()

See also t.isThisExpression(node, opts) and t.assertThisExpression(node, opts).

Aliases: Expression


thisTypeAnnotation

t.thisTypeAnnotation()

See also t.isThisTypeAnnotation(node, opts) and t.assertThisTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


throwStatement

t.throwStatement(argument)

See also t.isThrowStatement(node, opts) and t.assertThrowStatement(node, opts).

Aliases: Statement, Terminatorless, CompletionStatement


tryStatement

t.tryStatement(block, handler, finalizer)

See also t.isTryStatement(node, opts) and t.assertTryStatement(node, opts).

Aliases: Statement


tupleTypeAnnotation

t.tupleTypeAnnotation(types)

See also t.isTupleTypeAnnotation(node, opts) and t.assertTupleTypeAnnotation(node, opts).

Aliases: Flow


typeAlias

t.typeAlias(id, typeParameters, right)

See also t.isTypeAlias(node, opts) and t.assertTypeAlias(node, opts).

Aliases: Flow, FlowDeclaration, Statement, Declaration


typeAnnotation

t.typeAnnotation(typeAnnotation)

See also t.isTypeAnnotation(node, opts) and t.assertTypeAnnotation(node, opts).

Aliases: Flow


typeCastExpression

t.typeCastExpression(expression, typeAnnotation)

See also t.isTypeCastExpression(node, opts) and t.assertTypeCastExpression(node, opts).

Aliases: Flow, ExpressionWrapper, Expression


typeParameter

t.typeParameter(bound)

See also t.isTypeParameter(node, opts) and t.assertTypeParameter(node, opts).

Aliases: Flow


typeParameterDeclaration

t.typeParameterDeclaration(params)

See also t.isTypeParameterDeclaration(node, opts) and t.assertTypeParameterDeclaration(node, opts).

Aliases: Flow


typeParameterInstantiation

t.typeParameterInstantiation(params)

See also t.isTypeParameterInstantiation(node, opts) and t.assertTypeParameterInstantiation(node, opts).

Aliases: Flow


typeofTypeAnnotation

t.typeofTypeAnnotation(argument)

See also t.isTypeofTypeAnnotation(node, opts) and t.assertTypeofTypeAnnotation(node, opts).

Aliases: Flow


unaryExpression

t.unaryExpression(operator, argument, prefix)

See also t.isUnaryExpression(node, opts) and t.assertUnaryExpression(node, opts).

Aliases: UnaryLike, Expression


unionTypeAnnotation

t.unionTypeAnnotation(types)

See also t.isUnionTypeAnnotation(node, opts) and t.assertUnionTypeAnnotation(node, opts).

Aliases: Flow


updateExpression

t.updateExpression(operator, argument, prefix)

See also t.isUpdateExpression(node, opts) and t.assertUpdateExpression(node, opts).

Aliases: Expression


variableDeclaration

t.variableDeclaration(kind, declarations)

See also t.isVariableDeclaration(node, opts) and t.assertVariableDeclaration(node, opts).

Aliases: Statement, Declaration


variableDeclarator

t.variableDeclarator(id, init)

See also t.isVariableDeclarator(node, opts) and t.assertVariableDeclarator(node, opts).


voidTypeAnnotation

t.voidTypeAnnotation()

See also t.isVoidTypeAnnotation(node, opts) and t.assertVoidTypeAnnotation(node, opts).

Aliases: Flow, FlowBaseAnnotation


whileStatement

t.whileStatement(test, body)

See also t.isWhileStatement(node, opts) and t.assertWhileStatement(node, opts).

Aliases: Statement, BlockParent, Loop, While, Scopable


withStatement

t.withStatement(object, body)

See also t.isWithStatement(node, opts) and t.assertWithStatement(node, opts).

Aliases: Statement


yieldExpression

t.yieldExpression(argument, delegate)

See also t.isYieldExpression(node, opts) and t.assertYieldExpression(node, opts).

Aliases: Expression, Terminatorless