aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-types
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-04-20 03:09:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-04-24 16:14:29 +0200
commit82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch)
tree965f6eb89b84d65a62b49008fd972c004832ccd1 /node_modules/babel-types
parente6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff)
downloadwallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.xz
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node.
Diffstat (limited to 'node_modules/babel-types')
-rw-r--r--node_modules/babel-types/README.md1009
-rw-r--r--node_modules/babel-types/lib/converters.js12
-rw-r--r--node_modules/babel-types/lib/definitions/es2015.js3
-rw-r--r--node_modules/babel-types/lib/definitions/experimental.js4
-rw-r--r--node_modules/babel-types/lib/definitions/jsx.js12
-rw-r--r--node_modules/babel-types/lib/index.js32
-rw-r--r--node_modules/babel-types/lib/retrievers.js4
-rw-r--r--node_modules/babel-types/lib/validators.js64
-rw-r--r--node_modules/babel-types/package.json7
9 files changed, 976 insertions, 171 deletions
diff --git a/node_modules/babel-types/README.md b/node_modules/babel-types/README.md
index 4c0162feb..683388362 100644
--- a/node_modules/babel-types/README.md
+++ b/node_modules/babel-types/README.md
@@ -1,19 +1,33 @@
# babel-types
-This module contains methods for building ASTs manually and for checking the types of AST nodes.
+> This module contains methods for building ASTs manually and for checking the types of AST nodes.
+
+## Install
+
+```sh
+npm install --save-dev babel-types
+```
## API
<!-- begin generated section -->
-### t.anyTypeAnnotation()
+### anyTypeAnnotation
+```javascript
+t.anyTypeAnnotation()
+```
See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.arrayExpression(elements)
+---
+
+### arrayExpression
+```javascript
+t.arrayExpression(elements)
+```
See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`.
@@ -21,7 +35,12 @@ Aliases: `Expression`
- `elements`: `Array<null | Expression | SpreadElement>` (default: `[]`)
-### t.arrayPattern(elements, typeAnnotation)
+---
+
+### arrayPattern
+```javascript
+t.arrayPattern(elements, typeAnnotation)
+```
See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`.
@@ -31,7 +50,12 @@ Aliases: `Pattern`, `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.arrayTypeAnnotation(elementType)
+---
+
+### arrayTypeAnnotation
+```javascript
+t.arrayTypeAnnotation(elementType)
+```
See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`.
@@ -39,7 +63,12 @@ Aliases: `Flow`
- `elementType` (required)
-### t.arrowFunctionExpression(params, body, async)
+---
+
+### arrowFunctionExpression
+```javascript
+t.arrowFunctionExpression(params, body, async)
+```
See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`.
@@ -51,7 +80,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`,
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.assignmentExpression(operator, left, right)
+---
+
+### assignmentExpression
+```javascript
+t.assignmentExpression(operator, left, right)
+```
See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`.
@@ -61,7 +95,12 @@ Aliases: `Expression`
- `left`: `LVal` (required)
- `right`: `Expression` (required)
-### t.assignmentPattern(left, right)
+---
+
+### assignmentPattern
+```javascript
+t.assignmentPattern(left, right)
+```
See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`.
@@ -71,7 +110,12 @@ Aliases: `Pattern`, `LVal`
- `right`: `Expression` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.awaitExpression(argument)
+---
+
+### awaitExpression
+```javascript
+t.awaitExpression(argument)
+```
See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`.
@@ -79,7 +123,12 @@ Aliases: `Expression`, `Terminatorless`
- `argument`: `Expression` (required)
-### t.binaryExpression(operator, left, right)
+---
+
+### binaryExpression
+```javascript
+t.binaryExpression(operator, left, right)
+```
See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`.
@@ -89,7 +138,12 @@ Aliases: `Binary`, `Expression`
- `left`: `Expression` (required)
- `right`: `Expression` (required)
-### t.bindExpression(object, callee)
+---
+
+### bindExpression
+```javascript
+t.bindExpression(object, callee)
+```
See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`.
@@ -98,7 +152,12 @@ Aliases: `Expression`
- `object` (required)
- `callee` (required)
-### t.blockStatement(body, directives)
+---
+
+### blockStatement
+```javascript
+t.blockStatement(body, directives)
+```
See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`.
@@ -107,7 +166,12 @@ Aliases: `Scopable`, `BlockParent`, `Block`, `Statement`
- `body`: `Array<Statement>` (required)
- `directives`: `Array<Directive>` (default: `[]`)
-### t.booleanLiteral(value)
+---
+
+### booleanLiteral
+```javascript
+t.booleanLiteral(value)
+```
See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`.
@@ -115,21 +179,36 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `boolean` (required)
-### t.booleanLiteralTypeAnnotation()
+---
+
+### booleanLiteralTypeAnnotation
+```javascript
+t.booleanLiteralTypeAnnotation()
+```
See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.booleanTypeAnnotation()
+---
+
+### booleanTypeAnnotation
+```javascript
+t.booleanTypeAnnotation()
+```
See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.breakStatement(label)
+---
+
+### breakStatement
+```javascript
+t.breakStatement(label)
+```
See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`.
@@ -137,7 +216,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `label`: `Identifier` (default: `null`)
-### t.callExpression(callee, arguments)
+---
+
+### callExpression
+```javascript
+t.callExpression(callee, arguments)
+```
See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`.
@@ -146,7 +230,12 @@ Aliases: `Expression`
- `callee`: `Expression` (required)
- `arguments`: `Array<Expression | SpreadElement>` (required)
-### t.catchClause(param, body)
+---
+
+### catchClause
+```javascript
+t.catchClause(param, body)
+```
See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`.
@@ -155,13 +244,23 @@ Aliases: `Scopable`
- `param`: `Identifier` (required)
- `body`: `BlockStatement` (required)
-### t.classBody(body)
+---
+
+### classBody
+```javascript
+t.classBody(body)
+```
See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`.
- `body`: `Array<ClassMethod | ClassProperty>` (required)
-### t.classDeclaration(id, superClass, body, decorators)
+---
+
+### classDeclaration
+```javascript
+t.classDeclaration(id, superClass, body, decorators)
+```
See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`.
@@ -176,7 +275,12 @@ Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish`
- `superTypeParameters` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classExpression(id, superClass, body, decorators)
+---
+
+### classExpression
+```javascript
+t.classExpression(id, superClass, body, decorators)
+```
See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`.
@@ -191,7 +295,12 @@ Aliases: `Scopable`, `Class`, `Expression`, `Pureish`
- `superTypeParameters` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classImplements(id, typeParameters)
+---
+
+### classImplements
+```javascript
+t.classImplements(id, typeParameters)
+```
See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`.
@@ -200,7 +309,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.classMethod(kind, key, params, body, computed, static)
+---
+
+### classMethod
+```javascript
+t.classMethod(kind, key, params, body, computed, static)
+```
See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`.
@@ -218,7 +332,12 @@ Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classProperty(key, value, typeAnnotation, decorators, computed)
+---
+
+### classProperty
+```javascript
+t.classProperty(key, value, typeAnnotation, decorators, computed)
+```
See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`.
@@ -230,7 +349,12 @@ Aliases: `Property`
- `decorators` (required)
- `computed`: `boolean` (default: `false`)
-### t.conditionalExpression(test, consequent, alternate)
+---
+
+### conditionalExpression
+```javascript
+t.conditionalExpression(test, consequent, alternate)
+```
See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`.
@@ -240,7 +364,12 @@ Aliases: `Expression`, `Conditional`
- `consequent`: `Expression` (required)
- `alternate`: `Expression` (required)
-### t.continueStatement(label)
+---
+
+### continueStatement
+```javascript
+t.continueStatement(label)
+```
See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`.
@@ -248,14 +377,24 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `label`: `Identifier` (default: `null`)
-### t.debuggerStatement()
+---
+
+### debuggerStatement
+```javascript
+t.debuggerStatement()
+```
See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`.
Aliases: `Statement`
-### t.declareClass(id, typeParameters, extends, body)
+---
+
+### declareClass
+```javascript
+t.declareClass(id, typeParameters, extends, body)
+```
See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`.
@@ -266,7 +405,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.declareFunction(id)
+---
+
+### declareFunction
+```javascript
+t.declareFunction(id)
+```
See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`.
@@ -274,7 +418,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
-### t.declareInterface(id, typeParameters, extends, body)
+---
+
+### declareInterface
+```javascript
+t.declareInterface(id, typeParameters, extends, body)
+```
See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`.
@@ -285,7 +434,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.declareModule(id, body)
+---
+
+### declareModule
+```javascript
+t.declareModule(id, body)
+```
See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`.
@@ -294,7 +448,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
- `body` (required)
-### t.declareModuleExports(typeAnnotation)
+---
+
+### declareModuleExports
+```javascript
+t.declareModuleExports(typeAnnotation)
+```
See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`.
@@ -302,7 +461,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeAnnotation` (required)
-### t.declareTypeAlias(id, typeParameters, right)
+---
+
+### declareTypeAlias
+```javascript
+t.declareTypeAlias(id, typeParameters, right)
+```
See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`.
@@ -312,7 +476,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeParameters` (required)
- `right` (required)
-### t.declareVariable(id)
+---
+
+### declareVariable
+```javascript
+t.declareVariable(id)
+```
See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`.
@@ -320,25 +489,45 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
-### t.decorator(expression)
+---
+
+### decorator
+```javascript
+t.decorator(expression)
+```
See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`.
- `expression`: `Expression` (required)
-### t.directive(value)
+---
+
+### directive
+```javascript
+t.directive(value)
+```
See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`.
- `value`: `DirectiveLiteral` (required)
-### t.directiveLiteral(value)
+---
+
+### directiveLiteral
+```javascript
+t.directiveLiteral(value)
+```
See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`.
- `value`: `string` (required)
-### t.doExpression(body)
+---
+
+### doExpression
+```javascript
+t.doExpression(body)
+```
See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`.
@@ -346,7 +535,12 @@ Aliases: `Expression`
- `body`: `BlockStatement` (required)
-### t.doWhileStatement(test, body)
+---
+
+### doWhileStatement
+```javascript
+t.doWhileStatement(test, body)
+```
See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`.
@@ -355,28 +549,48 @@ Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
- `test`: `Expression` (required)
- `body`: `Statement` (required)
-### t.emptyStatement()
+---
+
+### emptyStatement
+```javascript
+t.emptyStatement()
+```
See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`.
Aliases: `Statement`
-### t.emptyTypeAnnotation()
+---
+
+### emptyTypeAnnotation
+```javascript
+t.emptyTypeAnnotation()
+```
See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.existentialTypeParam()
+---
+
+### existentialTypeParam
+```javascript
+t.existentialTypeParam()
+```
See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`.
Aliases: `Flow`
-### t.exportAllDeclaration(source)
+---
+
+### exportAllDeclaration
+```javascript
+t.exportAllDeclaration(source)
+```
See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`.
@@ -384,7 +598,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `source`: `StringLiteral` (required)
-### t.exportDefaultDeclaration(declaration)
+---
+
+### exportDefaultDeclaration
+```javascript
+t.exportDefaultDeclaration(declaration)
+```
See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`.
@@ -392,7 +611,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required)
-### t.exportDefaultSpecifier(exported)
+---
+
+### exportDefaultSpecifier
+```javascript
+t.exportDefaultSpecifier(exported)
+```
See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`.
@@ -400,7 +624,12 @@ Aliases: `ModuleSpecifier`
- `exported`: `Identifier` (required)
-### t.exportNamedDeclaration(declaration, specifiers, source)
+---
+
+### exportNamedDeclaration
+```javascript
+t.exportNamedDeclaration(declaration, specifiers, source)
+```
See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`.
@@ -410,7 +639,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `specifiers`: `Array<ExportSpecifier>` (required)
- `source`: `StringLiteral` (default: `null`)
-### t.exportNamespaceSpecifier(exported)
+---
+
+### exportNamespaceSpecifier
+```javascript
+t.exportNamespaceSpecifier(exported)
+```
See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`.
@@ -418,7 +652,12 @@ Aliases: `ModuleSpecifier`
- `exported`: `Identifier` (required)
-### t.exportSpecifier(local, exported)
+---
+
+### exportSpecifier
+```javascript
+t.exportSpecifier(local, exported)
+```
See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`.
@@ -427,7 +666,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
- `exported`: `Identifier` (required)
-### t.expressionStatement(expression)
+---
+
+### expressionStatement
+```javascript
+t.expressionStatement(expression)
+```
See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`.
@@ -435,7 +679,12 @@ Aliases: `Statement`, `ExpressionWrapper`
- `expression`: `Expression` (required)
-### t.file(program, comments, tokens)
+---
+
+### file
+```javascript
+t.file(program, comments, tokens)
+```
See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
@@ -443,7 +692,12 @@ See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
- `comments` (required)
- `tokens` (required)
-### t.forAwaitStatement(left, right, body)
+---
+
+### forAwaitStatement
+```javascript
+t.forAwaitStatement(left, right, body)
+```
See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`.
@@ -453,7 +707,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forInStatement(left, right, body)
+---
+
+### forInStatement
+```javascript
+t.forInStatement(left, right, body)
+```
See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`.
@@ -463,7 +722,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forOfStatement(left, right, body)
+---
+
+### forOfStatement
+```javascript
+t.forOfStatement(left, right, body)
+```
See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`.
@@ -473,7 +737,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forStatement(init, test, update, body)
+---
+
+### forStatement
+```javascript
+t.forStatement(init, test, update, body)
+```
See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`.
@@ -484,7 +753,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`
- `update`: `Expression` (default: `null`)
- `body`: `Statement` (required)
-### t.functionDeclaration(id, params, body, generator, async)
+---
+
+### functionDeclaration
+```javascript
+t.functionDeclaration(id, params, body, generator, async)
+```
See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`.
@@ -498,7 +772,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.functionExpression(id, params, body, generator, async)
+---
+
+### functionExpression
+```javascript
+t.functionExpression(id, params, body, generator, async)
+```
See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`.
@@ -512,7 +791,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`,
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.functionTypeAnnotation(typeParameters, params, rest, returnType)
+---
+
+### functionTypeAnnotation
+```javascript
+t.functionTypeAnnotation(typeParameters, params, rest, returnType)
+```
See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`.
@@ -523,7 +807,12 @@ Aliases: `Flow`
- `rest` (required)
- `returnType` (required)
-### t.functionTypeParam(name, typeAnnotation)
+---
+
+### functionTypeParam
+```javascript
+t.functionTypeParam(name, typeAnnotation)
+```
See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`.
@@ -532,7 +821,12 @@ Aliases: `Flow`
- `name` (required)
- `typeAnnotation` (required)
-### t.genericTypeAnnotation(id, typeParameters)
+---
+
+### genericTypeAnnotation
+```javascript
+t.genericTypeAnnotation(id, typeParameters)
+```
See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`.
@@ -541,7 +835,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.identifier(name)
+---
+
+### identifier
+```javascript
+t.identifier(name)
+```
See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`.
@@ -551,7 +850,12 @@ Aliases: `Expression`, `LVal`
- `decorators`: `Array<Decorator>` (default: `null`)
- `typeAnnotation` (default: `null`)
-### t.ifStatement(test, consequent, alternate)
+---
+
+### ifStatement
+```javascript
+t.ifStatement(test, consequent, alternate)
+```
See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`.
@@ -561,7 +865,24 @@ Aliases: `Statement`, `Conditional`
- `consequent`: `Statement` (required)
- `alternate`: `Statement` (default: `null`)
-### t.importDeclaration(specifiers, source)
+---
+
+### import
+```javascript
+t.import()
+```
+
+See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
+
+Aliases: `Expression`
+
+
+---
+
+### importDeclaration
+```javascript
+t.importDeclaration(specifiers, source)
+```
See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`.
@@ -570,7 +891,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`
- `specifiers`: `Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>` (required)
- `source`: `StringLiteral` (required)
-### t.importDefaultSpecifier(local)
+---
+
+### importDefaultSpecifier
+```javascript
+t.importDefaultSpecifier(local)
+```
See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`.
@@ -578,7 +904,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
-### t.importNamespaceSpecifier(local)
+---
+
+### importNamespaceSpecifier
+```javascript
+t.importNamespaceSpecifier(local)
+```
See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`.
@@ -586,7 +917,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
-### t.importSpecifier(local, imported)
+---
+
+### importSpecifier
+```javascript
+t.importSpecifier(local, imported)
+```
See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`.
@@ -594,8 +930,14 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
- `imported`: `Identifier` (required)
+ - `importKind`: `null | 'type' | 'typeof'` (default: `null`)
-### t.interfaceDeclaration(id, typeParameters, extends, body)
+---
+
+### interfaceDeclaration
+```javascript
+t.interfaceDeclaration(id, typeParameters, extends, body)
+```
See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`.
@@ -606,7 +948,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.interfaceExtends(id, typeParameters)
+---
+
+### interfaceExtends
+```javascript
+t.interfaceExtends(id, typeParameters)
+```
See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`.
@@ -615,7 +962,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.intersectionTypeAnnotation(types)
+---
+
+### intersectionTypeAnnotation
+```javascript
+t.intersectionTypeAnnotation(types)
+```
See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`.
@@ -623,7 +975,12 @@ Aliases: `Flow`
- `types` (required)
-### t.jSXAttribute(name, value)
+---
+
+### jSXAttribute
+```javascript
+t.jSXAttribute(name, value)
+```
See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`.
@@ -632,7 +989,12 @@ Aliases: `JSX`, `Immutable`
- `name`: `JSXIdentifier | JSXNamespacedName` (required)
- `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`)
-### t.jSXClosingElement(name)
+---
+
+### jSXClosingElement
+```javascript
+t.jSXClosingElement(name)
+```
See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`.
@@ -640,7 +1002,12 @@ Aliases: `JSX`, `Immutable`
- `name`: `JSXIdentifier | JSXMemberExpression` (required)
-### t.jSXElement(openingElement, closingElement, children, selfClosing)
+---
+
+### jSXElement
+```javascript
+t.jSXElement(openingElement, closingElement, children, selfClosing)
+```
See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`.
@@ -648,17 +1015,27 @@ Aliases: `JSX`, `Immutable`, `Expression`
- `openingElement`: `JSXOpeningElement` (required)
- `closingElement`: `JSXClosingElement` (default: `null`)
- - `children`: `Array<JSXText | JSXExpressionContainer | JSXElement>` (required)
+ - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement>` (required)
- `selfClosing` (required)
-### t.jSXEmptyExpression()
+---
+
+### jSXEmptyExpression
+```javascript
+t.jSXEmptyExpression()
+```
See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`.
Aliases: `JSX`, `Expression`
-### t.jSXExpressionContainer(expression)
+---
+
+### jSXExpressionContainer
+```javascript
+t.jSXExpressionContainer(expression)
+```
See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`.
@@ -666,7 +1043,12 @@ Aliases: `JSX`, `Immutable`
- `expression`: `Expression` (required)
-### t.jSXIdentifier(name)
+---
+
+### jSXIdentifier
+```javascript
+t.jSXIdentifier(name)
+```
See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`.
@@ -674,7 +1056,12 @@ Aliases: `JSX`, `Expression`
- `name`: `string` (required)
-### t.jSXMemberExpression(object, property)
+---
+
+### jSXMemberExpression
+```javascript
+t.jSXMemberExpression(object, property)
+```
See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`.
@@ -683,7 +1070,12 @@ Aliases: `JSX`, `Expression`
- `object`: `JSXMemberExpression | JSXIdentifier` (required)
- `property`: `JSXIdentifier` (required)
-### t.jSXNamespacedName(namespace, name)
+---
+
+### jSXNamespacedName
+```javascript
+t.jSXNamespacedName(namespace, name)
+```
See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`.
@@ -692,7 +1084,12 @@ Aliases: `JSX`
- `namespace`: `JSXIdentifier` (required)
- `name`: `JSXIdentifier` (required)
-### t.jSXOpeningElement(name, attributes, selfClosing)
+---
+
+### jSXOpeningElement
+```javascript
+t.jSXOpeningElement(name, attributes, selfClosing)
+```
See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`.
@@ -702,7 +1099,12 @@ Aliases: `JSX`, `Immutable`
- `attributes`: `Array<JSXAttribute | JSXSpreadAttribute>` (required)
- `selfClosing`: `boolean` (default: `false`)
-### t.jSXSpreadAttribute(argument)
+---
+
+### jSXSpreadAttribute
+```javascript
+t.jSXSpreadAttribute(argument)
+```
See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`.
@@ -710,7 +1112,25 @@ Aliases: `JSX`
- `argument`: `Expression` (required)
-### t.jSXText(value)
+---
+
+### jSXSpreadChild
+```javascript
+t.jSXSpreadChild(expression)
+```
+
+See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
+
+Aliases: `JSX`, `Immutable`
+
+ - `expression`: `Expression` (required)
+
+---
+
+### jSXText
+```javascript
+t.jSXText(value)
+```
See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`.
@@ -718,7 +1138,12 @@ Aliases: `JSX`, `Immutable`
- `value`: `string` (required)
-### t.labeledStatement(label, body)
+---
+
+### labeledStatement
+```javascript
+t.labeledStatement(label, body)
+```
See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`.
@@ -727,7 +1152,12 @@ Aliases: `Statement`
- `label`: `Identifier` (required)
- `body`: `Statement` (required)
-### t.logicalExpression(operator, left, right)
+---
+
+### logicalExpression
+```javascript
+t.logicalExpression(operator, left, right)
+```
See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`.
@@ -737,7 +1167,12 @@ Aliases: `Binary`, `Expression`
- `left`: `Expression` (required)
- `right`: `Expression` (required)
-### t.memberExpression(object, property, computed)
+---
+
+### memberExpression
+```javascript
+t.memberExpression(object, property, computed)
+```
See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`.
@@ -747,7 +1182,12 @@ Aliases: `Expression`, `LVal`
- `property`if computed then `Expression` else `Identifier` (required)
- `computed`: `boolean` (default: `false`)
-### t.metaProperty(meta, property)
+---
+
+### metaProperty
+```javascript
+t.metaProperty(meta, property)
+```
See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`.
@@ -756,14 +1196,24 @@ Aliases: `Expression`
- `meta`: `string` (required)
- `property`: `string` (required)
-### t.mixedTypeAnnotation()
+---
+
+### mixedTypeAnnotation
+```javascript
+t.mixedTypeAnnotation()
+```
See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.newExpression(callee, arguments)
+---
+
+### newExpression
+```javascript
+t.newExpression(callee, arguments)
+```
See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`.
@@ -772,26 +1222,46 @@ Aliases: `Expression`
- `callee`: `Expression` (required)
- `arguments`: `Array<Expression | SpreadElement>` (required)
-### t.noop()
+---
+
+### noop
+```javascript
+t.noop()
+```
See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`.
-### t.nullLiteral()
+---
+
+### nullLiteral
+```javascript
+t.nullLiteral()
+```
See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`.
Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-### t.nullLiteralTypeAnnotation()
+---
+
+### nullLiteralTypeAnnotation
+```javascript
+t.nullLiteralTypeAnnotation()
+```
See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.nullableTypeAnnotation(typeAnnotation)
+---
+
+### nullableTypeAnnotation
+```javascript
+t.nullableTypeAnnotation(typeAnnotation)
+```
See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`.
@@ -799,14 +1269,24 @@ Aliases: `Flow`
- `typeAnnotation` (required)
-### t.numberTypeAnnotation()
+---
+
+### numberTypeAnnotation
+```javascript
+t.numberTypeAnnotation()
+```
See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.numericLiteral(value)
+---
+
+### numericLiteral
+```javascript
+t.numericLiteral(value)
+```
See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`.
@@ -814,14 +1294,24 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `number` (required)
-### t.numericLiteralTypeAnnotation()
+---
+
+### numericLiteralTypeAnnotation
+```javascript
+t.numericLiteralTypeAnnotation()
+```
See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.objectExpression(properties)
+---
+
+### objectExpression
+```javascript
+t.objectExpression(properties)
+```
See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`.
@@ -829,7 +1319,12 @@ Aliases: `Expression`
- `properties`: `Array<ObjectMethod | ObjectProperty | SpreadProperty>` (required)
-### t.objectMethod(kind, key, params, body, computed)
+---
+
+### objectMethod
+```javascript
+t.objectMethod(kind, key, params, body, computed)
+```
See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`.
@@ -846,7 +1341,12 @@ Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionPa
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.objectPattern(properties, typeAnnotation)
+---
+
+### objectPattern
+```javascript
+t.objectPattern(properties, typeAnnotation)
+```
See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`.
@@ -856,7 +1356,12 @@ Aliases: `Pattern`, `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.objectProperty(key, value, computed, shorthand, decorators)
+---
+
+### objectProperty
+```javascript
+t.objectProperty(key, value, computed, shorthand, decorators)
+```
See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`.
@@ -868,7 +1373,12 @@ Aliases: `UserWhitespacable`, `Property`, `ObjectMember`
- `shorthand`: `boolean` (default: `false`)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.objectTypeAnnotation(properties, indexers, callProperties)
+---
+
+### objectTypeAnnotation
+```javascript
+t.objectTypeAnnotation(properties, indexers, callProperties)
+```
See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`.
@@ -878,7 +1388,12 @@ Aliases: `Flow`
- `indexers` (required)
- `callProperties` (required)
-### t.objectTypeCallProperty(value)
+---
+
+### objectTypeCallProperty
+```javascript
+t.objectTypeCallProperty(value)
+```
See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`.
@@ -886,7 +1401,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `value` (required)
-### t.objectTypeIndexer(id, key, value)
+---
+
+### objectTypeIndexer
+```javascript
+t.objectTypeIndexer(id, key, value)
+```
See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`.
@@ -896,7 +1416,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `key` (required)
- `value` (required)
-### t.objectTypeProperty(key, value)
+---
+
+### objectTypeProperty
+```javascript
+t.objectTypeProperty(key, value)
+```
See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`.
@@ -905,7 +1430,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `key` (required)
- `value` (required)
-### t.parenthesizedExpression(expression)
+---
+
+### parenthesizedExpression
+```javascript
+t.parenthesizedExpression(expression)
+```
See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`.
@@ -913,7 +1443,12 @@ Aliases: `Expression`, `ExpressionWrapper`
- `expression`: `Expression` (required)
-### t.program(body, directives)
+---
+
+### program
+```javascript
+t.program(body, directives)
+```
See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`.
@@ -922,7 +1457,12 @@ Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent`
- `body`: `Array<Statement>` (required)
- `directives`: `Array<Directive>` (default: `[]`)
-### t.qualifiedTypeIdentifier(id, qualification)
+---
+
+### qualifiedTypeIdentifier
+```javascript
+t.qualifiedTypeIdentifier(id, qualification)
+```
See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`.
@@ -931,7 +1471,12 @@ Aliases: `Flow`
- `id` (required)
- `qualification` (required)
-### t.regExpLiteral(pattern, flags)
+---
+
+### regExpLiteral
+```javascript
+t.regExpLiteral(pattern, flags)
+```
See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`.
@@ -940,7 +1485,12 @@ Aliases: `Expression`, `Literal`
- `pattern`: `string` (required)
- `flags`: `string` (default: `''`)
-### t.restElement(argument, typeAnnotation)
+---
+
+### restElement
+```javascript
+t.restElement(argument, typeAnnotation)
+```
See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`.
@@ -950,7 +1500,12 @@ Aliases: `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.restProperty(argument)
+---
+
+### restProperty
+```javascript
+t.restProperty(argument)
+```
See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`.
@@ -958,7 +1513,12 @@ Aliases: `UnaryLike`
- `argument`: `LVal` (required)
-### t.returnStatement(argument)
+---
+
+### returnStatement
+```javascript
+t.returnStatement(argument)
+```
See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`.
@@ -966,7 +1526,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `argument`: `Expression` (default: `null`)
-### t.sequenceExpression(expressions)
+---
+
+### sequenceExpression
+```javascript
+t.sequenceExpression(expressions)
+```
See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`.
@@ -974,7 +1539,12 @@ Aliases: `Expression`
- `expressions`: `Array<Expression>` (required)
-### t.spreadElement(argument)
+---
+
+### spreadElement
+```javascript
+t.spreadElement(argument)
+```
See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`.
@@ -982,7 +1552,12 @@ Aliases: `UnaryLike`
- `argument`: `Expression` (required)
-### t.spreadProperty(argument)
+---
+
+### spreadProperty
+```javascript
+t.spreadProperty(argument)
+```
See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`.
@@ -990,7 +1565,12 @@ Aliases: `UnaryLike`
- `argument`: `Expression` (required)
-### t.stringLiteral(value)
+---
+
+### stringLiteral
+```javascript
+t.stringLiteral(value)
+```
See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`.
@@ -998,35 +1578,60 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `string` (required)
-### t.stringLiteralTypeAnnotation()
+---
+
+### stringLiteralTypeAnnotation
+```javascript
+t.stringLiteralTypeAnnotation()
+```
See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.stringTypeAnnotation()
+---
+
+### stringTypeAnnotation
+```javascript
+t.stringTypeAnnotation()
+```
See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.super()
+---
+
+### super
+```javascript
+t.super()
+```
See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`.
Aliases: `Expression`
-### t.switchCase(test, consequent)
+---
+
+### switchCase
+```javascript
+t.switchCase(test, consequent)
+```
See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`.
- `test`: `Expression` (default: `null`)
- `consequent`: `Array<Statement>` (required)
-### t.switchStatement(discriminant, cases)
+---
+
+### switchStatement
+```javascript
+t.switchStatement(discriminant, cases)
+```
See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`.
@@ -1035,7 +1640,12 @@ Aliases: `Statement`, `BlockParent`, `Scopable`
- `discriminant`: `Expression` (required)
- `cases`: `Array<SwitchCase>` (required)
-### t.taggedTemplateExpression(tag, quasi)
+---
+
+### taggedTemplateExpression
+```javascript
+t.taggedTemplateExpression(tag, quasi)
+```
See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`.
@@ -1044,14 +1654,24 @@ Aliases: `Expression`
- `tag`: `Expression` (required)
- `quasi`: `TemplateLiteral` (required)
-### t.templateElement(value, tail)
+---
+
+### templateElement
+```javascript
+t.templateElement(value, tail)
+```
See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`.
- `value` (required)
- `tail`: `boolean` (default: `false`)
-### t.templateLiteral(quasis, expressions)
+---
+
+### templateLiteral
+```javascript
+t.templateLiteral(quasis, expressions)
+```
See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`.
@@ -1060,21 +1680,36 @@ Aliases: `Expression`, `Literal`
- `quasis`: `Array<TemplateElement>` (required)
- `expressions`: `Array<Expression>` (required)
-### t.thisExpression()
+---
+
+### thisExpression
+```javascript
+t.thisExpression()
+```
See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`.
Aliases: `Expression`
-### t.thisTypeAnnotation()
+---
+
+### thisTypeAnnotation
+```javascript
+t.thisTypeAnnotation()
+```
See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.throwStatement(argument)
+---
+
+### throwStatement
+```javascript
+t.throwStatement(argument)
+```
See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`.
@@ -1082,7 +1717,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `argument`: `Expression` (required)
-### t.tryStatement(block, handler, finalizer)
+---
+
+### tryStatement
+```javascript
+t.tryStatement(block, handler, finalizer)
+```
See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`.
@@ -1093,7 +1733,12 @@ Aliases: `Statement`
- `finalizer`: `BlockStatement` (default: `null`)
- `body`: `BlockStatement` (default: `null`)
-### t.tupleTypeAnnotation(types)
+---
+
+### tupleTypeAnnotation
+```javascript
+t.tupleTypeAnnotation(types)
+```
See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`.
@@ -1101,7 +1746,12 @@ Aliases: `Flow`
- `types` (required)
-### t.typeAlias(id, typeParameters, right)
+---
+
+### typeAlias
+```javascript
+t.typeAlias(id, typeParameters, right)
+```
See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`.
@@ -1111,7 +1761,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeParameters` (required)
- `right` (required)
-### t.typeAnnotation(typeAnnotation)
+---
+
+### typeAnnotation
+```javascript
+t.typeAnnotation(typeAnnotation)
+```
See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`.
@@ -1119,7 +1774,12 @@ Aliases: `Flow`
- `typeAnnotation` (required)
-### t.typeCastExpression(expression, typeAnnotation)
+---
+
+### typeCastExpression
+```javascript
+t.typeCastExpression(expression, typeAnnotation)
+```
See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`.
@@ -1128,7 +1788,12 @@ Aliases: `Flow`, `ExpressionWrapper`, `Expression`
- `expression` (required)
- `typeAnnotation` (required)
-### t.typeParameter(bound)
+---
+
+### typeParameter
+```javascript
+t.typeParameter(bound)
+```
See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`.
@@ -1136,7 +1801,12 @@ Aliases: `Flow`
- `bound` (required)
-### t.typeParameterDeclaration(params)
+---
+
+### typeParameterDeclaration
+```javascript
+t.typeParameterDeclaration(params)
+```
See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`.
@@ -1144,7 +1814,12 @@ Aliases: `Flow`
- `params` (required)
-### t.typeParameterInstantiation(params)
+---
+
+### typeParameterInstantiation
+```javascript
+t.typeParameterInstantiation(params)
+```
See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`.
@@ -1152,7 +1827,12 @@ Aliases: `Flow`
- `params` (required)
-### t.typeofTypeAnnotation(argument)
+---
+
+### typeofTypeAnnotation
+```javascript
+t.typeofTypeAnnotation(argument)
+```
See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`.
@@ -1160,7 +1840,12 @@ Aliases: `Flow`
- `argument` (required)
-### t.unaryExpression(operator, argument, prefix)
+---
+
+### unaryExpression
+```javascript
+t.unaryExpression(operator, argument, prefix)
+```
See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`.
@@ -1170,7 +1855,12 @@ Aliases: `UnaryLike`, `Expression`
- `argument`: `Expression` (required)
- `prefix`: `boolean` (default: `true`)
-### t.unionTypeAnnotation(types)
+---
+
+### unionTypeAnnotation
+```javascript
+t.unionTypeAnnotation(types)
+```
See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`.
@@ -1178,7 +1868,12 @@ Aliases: `Flow`
- `types` (required)
-### t.updateExpression(operator, argument, prefix)
+---
+
+### updateExpression
+```javascript
+t.updateExpression(operator, argument, prefix)
+```
See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`.
@@ -1188,7 +1883,12 @@ Aliases: `Expression`
- `argument`: `Expression` (required)
- `prefix`: `boolean` (default: `false`)
-### t.variableDeclaration(kind, declarations)
+---
+
+### variableDeclaration
+```javascript
+t.variableDeclaration(kind, declarations)
+```
See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`.
@@ -1197,21 +1897,36 @@ Aliases: `Statement`, `Declaration`
- `kind`: `"var" | "let" | "const"` (required)
- `declarations`: `Array<VariableDeclarator>` (required)
-### t.variableDeclarator(id, init)
+---
+
+### variableDeclarator
+```javascript
+t.variableDeclarator(id, init)
+```
See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`.
- `id`: `LVal` (required)
- `init`: `Expression` (default: `null`)
-### t.voidTypeAnnotation()
+---
+
+### voidTypeAnnotation
+```javascript
+t.voidTypeAnnotation()
+```
See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.whileStatement(test, body)
+---
+
+### whileStatement
+```javascript
+t.whileStatement(test, body)
+```
See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`.
@@ -1220,7 +1935,12 @@ Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
- `test`: `Expression` (required)
- `body`: `BlockStatement | Statement` (required)
-### t.withStatement(object, body)
+---
+
+### withStatement
+```javascript
+t.withStatement(object, body)
+```
See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`.
@@ -1229,7 +1949,12 @@ Aliases: `Statement`
- `object` (required)
- `body`: `BlockStatement | Statement` (required)
-### t.yieldExpression(argument, delegate)
+---
+
+### yieldExpression
+```javascript
+t.yieldExpression(argument, delegate)
+```
See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`.
@@ -1238,6 +1963,8 @@ Aliases: `Expression`, `Terminatorless`
- `argument`: `Expression` (default: `null`)
- `delegate`: `boolean` (default: `false`)
+---
+
<!-- end generated section -->
diff --git a/node_modules/babel-types/lib/converters.js b/node_modules/babel-types/lib/converters.js
index bcf3942c2..94db954bd 100644
--- a/node_modules/babel-types/lib/converters.js
+++ b/node_modules/babel-types/lib/converters.js
@@ -28,18 +28,10 @@ var _isPlainObject = require("lodash/isPlainObject");
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
-var _isNumber = require("lodash/isNumber");
-
-var _isNumber2 = _interopRequireDefault(_isNumber);
-
var _isRegExp = require("lodash/isRegExp");
var _isRegExp2 = _interopRequireDefault(_isRegExp);
-var _isString = require("lodash/isString");
-
-var _isString2 = _interopRequireDefault(_isString);
-
var _index = require("./index");
var t = _interopRequireWildcard(_index);
@@ -310,11 +302,11 @@ function valueToNode(value) {
return t.nullLiteral();
}
- if ((0, _isString2.default)(value)) {
+ if (typeof value === "string") {
return t.stringLiteral(value);
}
- if ((0, _isNumber2.default)(value)) {
+ if (typeof value === "number") {
return t.numericLiteral(value);
}
diff --git a/node_modules/babel-types/lib/definitions/es2015.js b/node_modules/babel-types/lib/definitions/es2015.js
index cbce5536d..a823aa22f 100644
--- a/node_modules/babel-types/lib/definitions/es2015.js
+++ b/node_modules/babel-types/lib/definitions/es2015.js
@@ -213,6 +213,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
},
imported: {
validate: (0, _index.assertNodeType)("Identifier")
+ },
+ importKind: {
+ validate: (0, _index.assertOneOf)(null, "type", "typeof")
}
}
});
diff --git a/node_modules/babel-types/lib/definitions/experimental.js b/node_modules/babel-types/lib/definitions/experimental.js
index 184bf3597..d65d60968 100644
--- a/node_modules/babel-types/lib/definitions/experimental.js
+++ b/node_modules/babel-types/lib/definitions/experimental.js
@@ -39,6 +39,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
fields: {}
});
+(0, _index2.default)("Import", {
+ aliases: ["Expression"]
+});
+
(0, _index2.default)("Decorator", {
visitor: ["expression"],
fields: {
diff --git a/node_modules/babel-types/lib/definitions/jsx.js b/node_modules/babel-types/lib/definitions/jsx.js
index 920332a4b..1c0c0665a 100644
--- a/node_modules/babel-types/lib/definitions/jsx.js
+++ b/node_modules/babel-types/lib/definitions/jsx.js
@@ -43,7 +43,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
validate: (0, _index.assertNodeType)("JSXClosingElement")
},
children: {
- validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXElement")))
+ validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement")))
}
}
});
@@ -62,6 +62,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
}
});
+(0, _index2.default)("JSXSpreadChild", {
+ visitor: ["expression"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _index.assertNodeType)("Expression")
+ }
+ }
+});
+
(0, _index2.default)("JSXIdentifier", {
builder: ["name"],
aliases: ["JSX", "Expression"],
diff --git a/node_modules/babel-types/lib/index.js b/node_modules/babel-types/lib/index.js
index 93619fe9e..4c0070300 100644
--- a/node_modules/babel-types/lib/index.js
+++ b/node_modules/babel-types/lib/index.js
@@ -1,7 +1,7 @@
"use strict";
exports.__esModule = true;
-exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
+exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
var _getOwnPropertySymbols = require("babel-runtime/core-js/object/get-own-property-symbols");
@@ -229,6 +229,12 @@ Object.defineProperty(exports, "isImmutable", {
return _validators.isImmutable;
}
});
+Object.defineProperty(exports, "isNodesEquivalent", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isNodesEquivalent;
+ }
+});
var _converters = require("./converters");
@@ -312,18 +318,10 @@ var _toFastProperties = require("to-fast-properties");
var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
-var _compact = require("lodash/compact");
-
-var _compact2 = _interopRequireDefault(_compact);
-
var _clone = require("lodash/clone");
var _clone2 = _interopRequireDefault(_clone);
-var _each = require("lodash/each");
-
-var _each2 = _interopRequireDefault(_each);
-
var _uniq = require("lodash/uniq");
var _uniq2 = _interopRequireDefault(_uniq);
@@ -372,15 +370,15 @@ for (var type in t.VISITOR_KEYS) {
t.FLIPPED_ALIAS_KEYS = {};
-(0, _each2.default)(t.ALIAS_KEYS, function (aliases, type) {
- (0, _each2.default)(aliases, function (alias) {
+(0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) {
+ t.ALIAS_KEYS[type].forEach(function (alias) {
var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
types.push(type);
});
});
-(0, _each2.default)(t.FLIPPED_ALIAS_KEYS, function (types, type) {
- t[type.toUpperCase() + "_TYPES"] = types;
+(0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) {
+ t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type];
registerType(type);
});
@@ -429,7 +427,9 @@ function isType(nodeType, targetType) {
return false;
}
-(0, _each2.default)(t.BUILDER_KEYS, function (keys, type) {
+(0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) {
+ var keys = t.BUILDER_KEYS[type];
+
function builder() {
if (arguments.length > keys.length) {
throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
@@ -549,6 +549,7 @@ function ensureBlock(node) {
}
function clone(node) {
+ if (!node) return node;
var newNode = {};
for (var key in node) {
if (key[0] === "_") continue;
@@ -564,6 +565,7 @@ function cloneWithoutLoc(node) {
}
function cloneDeep(node) {
+ if (!node) return node;
var newNode = {};
for (var key in node) {
@@ -667,7 +669,7 @@ function inheritInnerComments(child, parent) {
function _inheritComments(key, child, parent) {
if (child && parent) {
- child[key] = (0, _uniq2.default)((0, _compact2.default)([].concat(child[key], parent[key])));
+ child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean));
}
}
diff --git a/node_modules/babel-types/lib/retrievers.js b/node_modules/babel-types/lib/retrievers.js
index e141aad68..e5782e083 100644
--- a/node_modules/babel-types/lib/retrievers.js
+++ b/node_modules/babel-types/lib/retrievers.js
@@ -38,8 +38,8 @@ function getBindingIdentifiers(node, duplicates, outerOnly) {
}
if (t.isExportDeclaration(id)) {
- if (t.isDeclaration(node.declaration)) {
- search.push(node.declaration);
+ if (t.isDeclaration(id.declaration)) {
+ search.push(id.declaration);
}
continue;
}
diff --git a/node_modules/babel-types/lib/validators.js b/node_modules/babel-types/lib/validators.js
index 7597f6489..ec30e55bd 100644
--- a/node_modules/babel-types/lib/validators.js
+++ b/node_modules/babel-types/lib/validators.js
@@ -2,6 +2,14 @@
exports.__esModule = true;
+var _keys = require("babel-runtime/core-js/object/keys");
+
+var _keys2 = _interopRequireDefault(_keys);
+
+var _typeof2 = require("babel-runtime/helpers/typeof");
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
@@ -15,6 +23,7 @@ exports.isVar = isVar;
exports.isSpecifierDefault = isSpecifierDefault;
exports.isScope = isScope;
exports.isImmutable = isImmutable;
+exports.isNodesEquivalent = isNodesEquivalent;
var _retrievers = require("./retrievers");
@@ -157,6 +166,8 @@ function isReferenced(node, parent) {
function isValidIdentifier(name) {
if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
return false;
+ } else if (name === "await") {
+ return false;
} else {
return _esutils2.default.keyword.isIdentifierNameES6(name);
}
@@ -198,4 +209,57 @@ function isImmutable(node) {
}
return false;
+}
+
+function isNodesEquivalent(a, b) {
+ if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) {
+ return a === b;
+ }
+
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type);
+
+ for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
+ var _ref2;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
+
+ var field = _ref2;
+
+ if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) {
+ return false;
+ }
+
+ if (Array.isArray(a[field])) {
+ if (!Array.isArray(b[field])) {
+ return false;
+ }
+ if (a[field].length !== b[field].length) {
+ return false;
+ }
+
+ for (var i = 0; i < a[field].length; i++) {
+ if (!isNodesEquivalent(a[field][i], b[field][i])) {
+ return false;
+ }
+ }
+ continue;
+ }
+
+ if (!isNodesEquivalent(a[field], b[field])) {
+ return false;
+ }
+ }
+
+ return true;
} \ No newline at end of file
diff --git a/node_modules/babel-types/package.json b/node_modules/babel-types/package.json
index d95ef6227..35f4b8554 100644
--- a/node_modules/babel-types/package.json
+++ b/node_modules/babel-types/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-types",
- "version": "6.18.0",
+ "version": "6.24.1",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,9 +8,12 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-types",
"main": "lib/index.js",
"dependencies": {
- "babel-runtime": "^6.9.1",
+ "babel-runtime": "^6.22.0",
"esutils": "^2.0.2",
"lodash": "^4.2.0",
"to-fast-properties": "^1.0.1"
+ },
+ "devDependencies": {
+ "babylon": "^6.8.2"
}
}