babel-types
Advanced tools
Comparing version 6.19.0 to 6.20.0
@@ -42,2 +42,6 @@ "use strict"; | ||
(0, _index2.default)("Import", { | ||
aliases: ["Expression"] | ||
}); | ||
(0, _index2.default)("Decorator", { | ||
@@ -44,0 +48,0 @@ visitor: ["expression"], |
@@ -558,2 +558,3 @@ "use strict"; | ||
function clone(node) { | ||
if (!node) return node; | ||
var newNode = {}; | ||
@@ -574,2 +575,3 @@ for (var key in node) { | ||
function cloneDeep(node) { | ||
if (!node) return node; | ||
var newNode = {}; | ||
@@ -576,0 +578,0 @@ |
{ | ||
"name": "babel-types", | ||
"version": "6.19.0", | ||
"version": "6.20.0", | ||
"description": "Babel Types is a Lodash-esque utility library for AST nodes", | ||
@@ -11,3 +11,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"dependencies": { | ||
"babel-runtime": "^6.9.1", | ||
"babel-runtime": "^6.20.0", | ||
"esutils": "^2.0.2", | ||
@@ -14,0 +14,0 @@ "lodash": "^4.2.0", |
981
README.md
# 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 | ||
@@ -9,3 +15,6 @@ | ||
### t.anyTypeAnnotation() | ||
### anyTypeAnnotation | ||
```javascript | ||
t.anyTypeAnnotation() | ||
``` | ||
@@ -17,4 +26,9 @@ See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`. | ||
### t.arrayExpression(elements) | ||
--- | ||
### arrayExpression | ||
```javascript | ||
t.arrayExpression(elements) | ||
``` | ||
See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`. | ||
@@ -26,4 +40,9 @@ | ||
### t.arrayPattern(elements, typeAnnotation) | ||
--- | ||
### arrayPattern | ||
```javascript | ||
t.arrayPattern(elements, typeAnnotation) | ||
``` | ||
See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`. | ||
@@ -37,4 +56,9 @@ | ||
### t.arrayTypeAnnotation(elementType) | ||
--- | ||
### arrayTypeAnnotation | ||
```javascript | ||
t.arrayTypeAnnotation(elementType) | ||
``` | ||
See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`. | ||
@@ -46,4 +70,9 @@ | ||
### t.arrowFunctionExpression(params, body, async) | ||
--- | ||
### arrowFunctionExpression | ||
```javascript | ||
t.arrowFunctionExpression(params, body, async) | ||
``` | ||
See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`. | ||
@@ -59,4 +88,9 @@ | ||
### t.assignmentExpression(operator, left, right) | ||
--- | ||
### assignmentExpression | ||
```javascript | ||
t.assignmentExpression(operator, left, right) | ||
``` | ||
See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`. | ||
@@ -70,4 +104,9 @@ | ||
### t.assignmentPattern(left, right) | ||
--- | ||
### assignmentPattern | ||
```javascript | ||
t.assignmentPattern(left, right) | ||
``` | ||
See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`. | ||
@@ -81,4 +120,9 @@ | ||
### t.awaitExpression(argument) | ||
--- | ||
### awaitExpression | ||
```javascript | ||
t.awaitExpression(argument) | ||
``` | ||
See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`. | ||
@@ -90,4 +134,9 @@ | ||
### t.binaryExpression(operator, left, right) | ||
--- | ||
### binaryExpression | ||
```javascript | ||
t.binaryExpression(operator, left, right) | ||
``` | ||
See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`. | ||
@@ -101,4 +150,9 @@ | ||
### t.bindExpression(object, callee) | ||
--- | ||
### bindExpression | ||
```javascript | ||
t.bindExpression(object, callee) | ||
``` | ||
See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`. | ||
@@ -111,4 +165,9 @@ | ||
### t.blockStatement(body, directives) | ||
--- | ||
### blockStatement | ||
```javascript | ||
t.blockStatement(body, directives) | ||
``` | ||
See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`. | ||
@@ -121,4 +180,9 @@ | ||
### t.booleanLiteral(value) | ||
--- | ||
### booleanLiteral | ||
```javascript | ||
t.booleanLiteral(value) | ||
``` | ||
See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`. | ||
@@ -130,4 +194,9 @@ | ||
### t.booleanLiteralTypeAnnotation() | ||
--- | ||
### booleanLiteralTypeAnnotation | ||
```javascript | ||
t.booleanLiteralTypeAnnotation() | ||
``` | ||
See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`. | ||
@@ -138,4 +207,9 @@ | ||
### t.booleanTypeAnnotation() | ||
--- | ||
### booleanTypeAnnotation | ||
```javascript | ||
t.booleanTypeAnnotation() | ||
``` | ||
See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`. | ||
@@ -146,4 +220,9 @@ | ||
### t.breakStatement(label) | ||
--- | ||
### breakStatement | ||
```javascript | ||
t.breakStatement(label) | ||
``` | ||
See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`. | ||
@@ -155,4 +234,9 @@ | ||
### t.callExpression(callee, arguments) | ||
--- | ||
### callExpression | ||
```javascript | ||
t.callExpression(callee, arguments) | ||
``` | ||
See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`. | ||
@@ -165,4 +249,9 @@ | ||
### t.catchClause(param, body) | ||
--- | ||
### catchClause | ||
```javascript | ||
t.catchClause(param, body) | ||
``` | ||
See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`. | ||
@@ -175,4 +264,9 @@ | ||
### t.classBody(body) | ||
--- | ||
### classBody | ||
```javascript | ||
t.classBody(body) | ||
``` | ||
See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`. | ||
@@ -182,4 +276,9 @@ | ||
### 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)`. | ||
@@ -198,4 +297,9 @@ | ||
### 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)`. | ||
@@ -214,4 +318,9 @@ | ||
### t.classImplements(id, typeParameters) | ||
--- | ||
### classImplements | ||
```javascript | ||
t.classImplements(id, typeParameters) | ||
``` | ||
See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`. | ||
@@ -224,4 +333,9 @@ | ||
### 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)`. | ||
@@ -243,4 +357,9 @@ | ||
### 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)`. | ||
@@ -256,4 +375,9 @@ | ||
### t.conditionalExpression(test, consequent, alternate) | ||
--- | ||
### conditionalExpression | ||
```javascript | ||
t.conditionalExpression(test, consequent, alternate) | ||
``` | ||
See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`. | ||
@@ -267,4 +391,9 @@ | ||
### t.continueStatement(label) | ||
--- | ||
### continueStatement | ||
```javascript | ||
t.continueStatement(label) | ||
``` | ||
See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`. | ||
@@ -276,4 +405,9 @@ | ||
### t.debuggerStatement() | ||
--- | ||
### debuggerStatement | ||
```javascript | ||
t.debuggerStatement() | ||
``` | ||
See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`. | ||
@@ -284,4 +418,9 @@ | ||
### 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)`. | ||
@@ -296,4 +435,9 @@ | ||
### t.declareFunction(id) | ||
--- | ||
### declareFunction | ||
```javascript | ||
t.declareFunction(id) | ||
``` | ||
See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`. | ||
@@ -305,4 +449,9 @@ | ||
### 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)`. | ||
@@ -317,4 +466,9 @@ | ||
### t.declareModule(id, body) | ||
--- | ||
### declareModule | ||
```javascript | ||
t.declareModule(id, body) | ||
``` | ||
See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`. | ||
@@ -327,4 +481,9 @@ | ||
### t.declareModuleExports(typeAnnotation) | ||
--- | ||
### declareModuleExports | ||
```javascript | ||
t.declareModuleExports(typeAnnotation) | ||
``` | ||
See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`. | ||
@@ -336,4 +495,9 @@ | ||
### t.declareTypeAlias(id, typeParameters, right) | ||
--- | ||
### declareTypeAlias | ||
```javascript | ||
t.declareTypeAlias(id, typeParameters, right) | ||
``` | ||
See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`. | ||
@@ -347,4 +511,9 @@ | ||
### t.declareVariable(id) | ||
--- | ||
### declareVariable | ||
```javascript | ||
t.declareVariable(id) | ||
``` | ||
See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`. | ||
@@ -356,4 +525,9 @@ | ||
### t.decorator(expression) | ||
--- | ||
### decorator | ||
```javascript | ||
t.decorator(expression) | ||
``` | ||
See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`. | ||
@@ -363,4 +537,9 @@ | ||
### t.directive(value) | ||
--- | ||
### directive | ||
```javascript | ||
t.directive(value) | ||
``` | ||
See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`. | ||
@@ -370,4 +549,9 @@ | ||
### t.directiveLiteral(value) | ||
--- | ||
### directiveLiteral | ||
```javascript | ||
t.directiveLiteral(value) | ||
``` | ||
See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`. | ||
@@ -377,4 +561,9 @@ | ||
### t.doExpression(body) | ||
--- | ||
### doExpression | ||
```javascript | ||
t.doExpression(body) | ||
``` | ||
See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`. | ||
@@ -386,4 +575,9 @@ | ||
### t.doWhileStatement(test, body) | ||
--- | ||
### doWhileStatement | ||
```javascript | ||
t.doWhileStatement(test, body) | ||
``` | ||
See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`. | ||
@@ -396,4 +590,9 @@ | ||
### t.emptyStatement() | ||
--- | ||
### emptyStatement | ||
```javascript | ||
t.emptyStatement() | ||
``` | ||
See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`. | ||
@@ -404,4 +603,9 @@ | ||
### t.emptyTypeAnnotation() | ||
--- | ||
### emptyTypeAnnotation | ||
```javascript | ||
t.emptyTypeAnnotation() | ||
``` | ||
See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`. | ||
@@ -412,4 +616,9 @@ | ||
### t.existentialTypeParam() | ||
--- | ||
### existentialTypeParam | ||
```javascript | ||
t.existentialTypeParam() | ||
``` | ||
See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`. | ||
@@ -420,4 +629,9 @@ | ||
### t.exportAllDeclaration(source) | ||
--- | ||
### exportAllDeclaration | ||
```javascript | ||
t.exportAllDeclaration(source) | ||
``` | ||
See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`. | ||
@@ -429,4 +643,9 @@ | ||
### t.exportDefaultDeclaration(declaration) | ||
--- | ||
### exportDefaultDeclaration | ||
```javascript | ||
t.exportDefaultDeclaration(declaration) | ||
``` | ||
See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`. | ||
@@ -438,4 +657,9 @@ | ||
### t.exportDefaultSpecifier(exported) | ||
--- | ||
### exportDefaultSpecifier | ||
```javascript | ||
t.exportDefaultSpecifier(exported) | ||
``` | ||
See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`. | ||
@@ -447,4 +671,9 @@ | ||
### t.exportNamedDeclaration(declaration, specifiers, source) | ||
--- | ||
### exportNamedDeclaration | ||
```javascript | ||
t.exportNamedDeclaration(declaration, specifiers, source) | ||
``` | ||
See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`. | ||
@@ -458,4 +687,9 @@ | ||
### t.exportNamespaceSpecifier(exported) | ||
--- | ||
### exportNamespaceSpecifier | ||
```javascript | ||
t.exportNamespaceSpecifier(exported) | ||
``` | ||
See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`. | ||
@@ -467,4 +701,9 @@ | ||
### t.exportSpecifier(local, exported) | ||
--- | ||
### exportSpecifier | ||
```javascript | ||
t.exportSpecifier(local, exported) | ||
``` | ||
See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`. | ||
@@ -477,4 +716,9 @@ | ||
### t.expressionStatement(expression) | ||
--- | ||
### expressionStatement | ||
```javascript | ||
t.expressionStatement(expression) | ||
``` | ||
See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`. | ||
@@ -486,4 +730,9 @@ | ||
### t.file(program, comments, tokens) | ||
--- | ||
### file | ||
```javascript | ||
t.file(program, comments, tokens) | ||
``` | ||
See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`. | ||
@@ -495,4 +744,9 @@ | ||
### t.forAwaitStatement(left, right, body) | ||
--- | ||
### forAwaitStatement | ||
```javascript | ||
t.forAwaitStatement(left, right, body) | ||
``` | ||
See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`. | ||
@@ -506,4 +760,9 @@ | ||
### t.forInStatement(left, right, body) | ||
--- | ||
### forInStatement | ||
```javascript | ||
t.forInStatement(left, right, body) | ||
``` | ||
See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`. | ||
@@ -517,4 +776,9 @@ | ||
### t.forOfStatement(left, right, body) | ||
--- | ||
### forOfStatement | ||
```javascript | ||
t.forOfStatement(left, right, body) | ||
``` | ||
See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`. | ||
@@ -528,4 +792,9 @@ | ||
### 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)`. | ||
@@ -540,4 +809,9 @@ | ||
### 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)`. | ||
@@ -555,4 +829,9 @@ | ||
### 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)`. | ||
@@ -570,4 +849,9 @@ | ||
### 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)`. | ||
@@ -582,4 +866,9 @@ | ||
### t.functionTypeParam(name, typeAnnotation) | ||
--- | ||
### functionTypeParam | ||
```javascript | ||
t.functionTypeParam(name, typeAnnotation) | ||
``` | ||
See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`. | ||
@@ -592,4 +881,9 @@ | ||
### t.genericTypeAnnotation(id, typeParameters) | ||
--- | ||
### genericTypeAnnotation | ||
```javascript | ||
t.genericTypeAnnotation(id, typeParameters) | ||
``` | ||
See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`. | ||
@@ -602,4 +896,9 @@ | ||
### t.identifier(name) | ||
--- | ||
### identifier | ||
```javascript | ||
t.identifier(name) | ||
``` | ||
See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. | ||
@@ -613,4 +912,9 @@ | ||
### t.ifStatement(test, consequent, alternate) | ||
--- | ||
### ifStatement | ||
```javascript | ||
t.ifStatement(test, consequent, alternate) | ||
``` | ||
See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`. | ||
@@ -624,4 +928,9 @@ | ||
### t.importDeclaration(specifiers, source) | ||
--- | ||
### importDeclaration | ||
```javascript | ||
t.importDeclaration(specifiers, source) | ||
``` | ||
See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`. | ||
@@ -634,4 +943,9 @@ | ||
### t.importDefaultSpecifier(local) | ||
--- | ||
### importDefaultSpecifier | ||
```javascript | ||
t.importDefaultSpecifier(local) | ||
``` | ||
See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`. | ||
@@ -643,4 +957,9 @@ | ||
### t.importNamespaceSpecifier(local) | ||
--- | ||
### importNamespaceSpecifier | ||
```javascript | ||
t.importNamespaceSpecifier(local) | ||
``` | ||
See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`. | ||
@@ -652,4 +971,9 @@ | ||
### t.importSpecifier(local, imported) | ||
--- | ||
### importSpecifier | ||
```javascript | ||
t.importSpecifier(local, imported) | ||
``` | ||
See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`. | ||
@@ -662,4 +986,9 @@ | ||
### 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)`. | ||
@@ -674,4 +1003,9 @@ | ||
### t.interfaceExtends(id, typeParameters) | ||
--- | ||
### interfaceExtends | ||
```javascript | ||
t.interfaceExtends(id, typeParameters) | ||
``` | ||
See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`. | ||
@@ -684,4 +1018,9 @@ | ||
### t.intersectionTypeAnnotation(types) | ||
--- | ||
### intersectionTypeAnnotation | ||
```javascript | ||
t.intersectionTypeAnnotation(types) | ||
``` | ||
See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`. | ||
@@ -693,4 +1032,9 @@ | ||
### t.jSXAttribute(name, value) | ||
--- | ||
### jSXAttribute | ||
```javascript | ||
t.jSXAttribute(name, value) | ||
``` | ||
See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`. | ||
@@ -703,4 +1047,9 @@ | ||
### t.jSXClosingElement(name) | ||
--- | ||
### jSXClosingElement | ||
```javascript | ||
t.jSXClosingElement(name) | ||
``` | ||
See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`. | ||
@@ -712,4 +1061,9 @@ | ||
### 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)`. | ||
@@ -724,4 +1078,9 @@ | ||
### t.jSXEmptyExpression() | ||
--- | ||
### jSXEmptyExpression | ||
```javascript | ||
t.jSXEmptyExpression() | ||
``` | ||
See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`. | ||
@@ -732,4 +1091,9 @@ | ||
### t.jSXExpressionContainer(expression) | ||
--- | ||
### jSXExpressionContainer | ||
```javascript | ||
t.jSXExpressionContainer(expression) | ||
``` | ||
See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`. | ||
@@ -741,4 +1105,9 @@ | ||
### t.jSXIdentifier(name) | ||
--- | ||
### jSXIdentifier | ||
```javascript | ||
t.jSXIdentifier(name) | ||
``` | ||
See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`. | ||
@@ -750,4 +1119,9 @@ | ||
### t.jSXMemberExpression(object, property) | ||
--- | ||
### jSXMemberExpression | ||
```javascript | ||
t.jSXMemberExpression(object, property) | ||
``` | ||
See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`. | ||
@@ -760,4 +1134,9 @@ | ||
### t.jSXNamespacedName(namespace, name) | ||
--- | ||
### jSXNamespacedName | ||
```javascript | ||
t.jSXNamespacedName(namespace, name) | ||
``` | ||
See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`. | ||
@@ -770,4 +1149,9 @@ | ||
### t.jSXOpeningElement(name, attributes, selfClosing) | ||
--- | ||
### jSXOpeningElement | ||
```javascript | ||
t.jSXOpeningElement(name, attributes, selfClosing) | ||
``` | ||
See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`. | ||
@@ -781,4 +1165,9 @@ | ||
### t.jSXSpreadAttribute(argument) | ||
--- | ||
### jSXSpreadAttribute | ||
```javascript | ||
t.jSXSpreadAttribute(argument) | ||
``` | ||
See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`. | ||
@@ -790,4 +1179,9 @@ | ||
### t.jSXText(value) | ||
--- | ||
### jSXText | ||
```javascript | ||
t.jSXText(value) | ||
``` | ||
See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`. | ||
@@ -799,4 +1193,9 @@ | ||
### t.labeledStatement(label, body) | ||
--- | ||
### labeledStatement | ||
```javascript | ||
t.labeledStatement(label, body) | ||
``` | ||
See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`. | ||
@@ -809,4 +1208,9 @@ | ||
### t.logicalExpression(operator, left, right) | ||
--- | ||
### logicalExpression | ||
```javascript | ||
t.logicalExpression(operator, left, right) | ||
``` | ||
See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`. | ||
@@ -820,4 +1224,9 @@ | ||
### t.memberExpression(object, property, computed) | ||
--- | ||
### memberExpression | ||
```javascript | ||
t.memberExpression(object, property, computed) | ||
``` | ||
See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`. | ||
@@ -831,4 +1240,9 @@ | ||
### t.metaProperty(meta, property) | ||
--- | ||
### metaProperty | ||
```javascript | ||
t.metaProperty(meta, property) | ||
``` | ||
See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`. | ||
@@ -841,4 +1255,9 @@ | ||
### t.mixedTypeAnnotation() | ||
--- | ||
### mixedTypeAnnotation | ||
```javascript | ||
t.mixedTypeAnnotation() | ||
``` | ||
See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`. | ||
@@ -849,4 +1268,9 @@ | ||
### t.newExpression(callee, arguments) | ||
--- | ||
### newExpression | ||
```javascript | ||
t.newExpression(callee, arguments) | ||
``` | ||
See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`. | ||
@@ -859,9 +1283,19 @@ | ||
### 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)`. | ||
@@ -872,4 +1306,9 @@ | ||
### t.nullLiteralTypeAnnotation() | ||
--- | ||
### nullLiteralTypeAnnotation | ||
```javascript | ||
t.nullLiteralTypeAnnotation() | ||
``` | ||
See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`. | ||
@@ -880,4 +1319,9 @@ | ||
### t.nullableTypeAnnotation(typeAnnotation) | ||
--- | ||
### nullableTypeAnnotation | ||
```javascript | ||
t.nullableTypeAnnotation(typeAnnotation) | ||
``` | ||
See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`. | ||
@@ -889,4 +1333,9 @@ | ||
### t.numberTypeAnnotation() | ||
--- | ||
### numberTypeAnnotation | ||
```javascript | ||
t.numberTypeAnnotation() | ||
``` | ||
See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`. | ||
@@ -897,4 +1346,9 @@ | ||
### t.numericLiteral(value) | ||
--- | ||
### numericLiteral | ||
```javascript | ||
t.numericLiteral(value) | ||
``` | ||
See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`. | ||
@@ -906,4 +1360,9 @@ | ||
### t.numericLiteralTypeAnnotation() | ||
--- | ||
### numericLiteralTypeAnnotation | ||
```javascript | ||
t.numericLiteralTypeAnnotation() | ||
``` | ||
See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`. | ||
@@ -914,4 +1373,9 @@ | ||
### t.objectExpression(properties) | ||
--- | ||
### objectExpression | ||
```javascript | ||
t.objectExpression(properties) | ||
``` | ||
See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`. | ||
@@ -923,4 +1387,9 @@ | ||
### 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)`. | ||
@@ -941,4 +1410,9 @@ | ||
### t.objectPattern(properties, typeAnnotation) | ||
--- | ||
### objectPattern | ||
```javascript | ||
t.objectPattern(properties, typeAnnotation) | ||
``` | ||
See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`. | ||
@@ -952,4 +1426,9 @@ | ||
### 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)`. | ||
@@ -965,4 +1444,9 @@ | ||
### t.objectTypeAnnotation(properties, indexers, callProperties) | ||
--- | ||
### objectTypeAnnotation | ||
```javascript | ||
t.objectTypeAnnotation(properties, indexers, callProperties) | ||
``` | ||
See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`. | ||
@@ -976,4 +1460,9 @@ | ||
### t.objectTypeCallProperty(value) | ||
--- | ||
### objectTypeCallProperty | ||
```javascript | ||
t.objectTypeCallProperty(value) | ||
``` | ||
See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`. | ||
@@ -985,4 +1474,9 @@ | ||
### t.objectTypeIndexer(id, key, value) | ||
--- | ||
### objectTypeIndexer | ||
```javascript | ||
t.objectTypeIndexer(id, key, value) | ||
``` | ||
See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`. | ||
@@ -996,4 +1490,9 @@ | ||
### t.objectTypeProperty(key, value) | ||
--- | ||
### objectTypeProperty | ||
```javascript | ||
t.objectTypeProperty(key, value) | ||
``` | ||
See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`. | ||
@@ -1006,4 +1505,9 @@ | ||
### t.parenthesizedExpression(expression) | ||
--- | ||
### parenthesizedExpression | ||
```javascript | ||
t.parenthesizedExpression(expression) | ||
``` | ||
See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`. | ||
@@ -1015,4 +1519,9 @@ | ||
### t.program(body, directives) | ||
--- | ||
### program | ||
```javascript | ||
t.program(body, directives) | ||
``` | ||
See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`. | ||
@@ -1025,4 +1534,9 @@ | ||
### t.qualifiedTypeIdentifier(id, qualification) | ||
--- | ||
### qualifiedTypeIdentifier | ||
```javascript | ||
t.qualifiedTypeIdentifier(id, qualification) | ||
``` | ||
See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`. | ||
@@ -1035,4 +1549,9 @@ | ||
### t.regExpLiteral(pattern, flags) | ||
--- | ||
### regExpLiteral | ||
```javascript | ||
t.regExpLiteral(pattern, flags) | ||
``` | ||
See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`. | ||
@@ -1045,4 +1564,9 @@ | ||
### t.restElement(argument, typeAnnotation) | ||
--- | ||
### restElement | ||
```javascript | ||
t.restElement(argument, typeAnnotation) | ||
``` | ||
See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`. | ||
@@ -1056,4 +1580,9 @@ | ||
### t.restProperty(argument) | ||
--- | ||
### restProperty | ||
```javascript | ||
t.restProperty(argument) | ||
``` | ||
See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`. | ||
@@ -1065,4 +1594,9 @@ | ||
### t.returnStatement(argument) | ||
--- | ||
### returnStatement | ||
```javascript | ||
t.returnStatement(argument) | ||
``` | ||
See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`. | ||
@@ -1074,4 +1608,9 @@ | ||
### t.sequenceExpression(expressions) | ||
--- | ||
### sequenceExpression | ||
```javascript | ||
t.sequenceExpression(expressions) | ||
``` | ||
See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`. | ||
@@ -1083,4 +1622,9 @@ | ||
### t.spreadElement(argument) | ||
--- | ||
### spreadElement | ||
```javascript | ||
t.spreadElement(argument) | ||
``` | ||
See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`. | ||
@@ -1092,4 +1636,9 @@ | ||
### t.spreadProperty(argument) | ||
--- | ||
### spreadProperty | ||
```javascript | ||
t.spreadProperty(argument) | ||
``` | ||
See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`. | ||
@@ -1101,4 +1650,9 @@ | ||
### t.stringLiteral(value) | ||
--- | ||
### stringLiteral | ||
```javascript | ||
t.stringLiteral(value) | ||
``` | ||
See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`. | ||
@@ -1110,4 +1664,9 @@ | ||
### t.stringLiteralTypeAnnotation() | ||
--- | ||
### stringLiteralTypeAnnotation | ||
```javascript | ||
t.stringLiteralTypeAnnotation() | ||
``` | ||
See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`. | ||
@@ -1118,4 +1677,9 @@ | ||
### t.stringTypeAnnotation() | ||
--- | ||
### stringTypeAnnotation | ||
```javascript | ||
t.stringTypeAnnotation() | ||
``` | ||
See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`. | ||
@@ -1126,4 +1690,9 @@ | ||
### t.super() | ||
--- | ||
### super | ||
```javascript | ||
t.super() | ||
``` | ||
See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`. | ||
@@ -1134,4 +1703,9 @@ | ||
### t.switchCase(test, consequent) | ||
--- | ||
### switchCase | ||
```javascript | ||
t.switchCase(test, consequent) | ||
``` | ||
See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`. | ||
@@ -1142,4 +1716,9 @@ | ||
### t.switchStatement(discriminant, cases) | ||
--- | ||
### switchStatement | ||
```javascript | ||
t.switchStatement(discriminant, cases) | ||
``` | ||
See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`. | ||
@@ -1152,4 +1731,9 @@ | ||
### t.taggedTemplateExpression(tag, quasi) | ||
--- | ||
### taggedTemplateExpression | ||
```javascript | ||
t.taggedTemplateExpression(tag, quasi) | ||
``` | ||
See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`. | ||
@@ -1162,4 +1746,9 @@ | ||
### t.templateElement(value, tail) | ||
--- | ||
### templateElement | ||
```javascript | ||
t.templateElement(value, tail) | ||
``` | ||
See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`. | ||
@@ -1170,4 +1759,9 @@ | ||
### t.templateLiteral(quasis, expressions) | ||
--- | ||
### templateLiteral | ||
```javascript | ||
t.templateLiteral(quasis, expressions) | ||
``` | ||
See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`. | ||
@@ -1180,4 +1774,9 @@ | ||
### t.thisExpression() | ||
--- | ||
### thisExpression | ||
```javascript | ||
t.thisExpression() | ||
``` | ||
See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`. | ||
@@ -1188,4 +1787,9 @@ | ||
### t.thisTypeAnnotation() | ||
--- | ||
### thisTypeAnnotation | ||
```javascript | ||
t.thisTypeAnnotation() | ||
``` | ||
See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`. | ||
@@ -1196,4 +1800,9 @@ | ||
### t.throwStatement(argument) | ||
--- | ||
### throwStatement | ||
```javascript | ||
t.throwStatement(argument) | ||
``` | ||
See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`. | ||
@@ -1205,4 +1814,9 @@ | ||
### t.tryStatement(block, handler, finalizer) | ||
--- | ||
### tryStatement | ||
```javascript | ||
t.tryStatement(block, handler, finalizer) | ||
``` | ||
See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`. | ||
@@ -1217,4 +1831,9 @@ | ||
### t.tupleTypeAnnotation(types) | ||
--- | ||
### tupleTypeAnnotation | ||
```javascript | ||
t.tupleTypeAnnotation(types) | ||
``` | ||
See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`. | ||
@@ -1226,4 +1845,9 @@ | ||
### t.typeAlias(id, typeParameters, right) | ||
--- | ||
### typeAlias | ||
```javascript | ||
t.typeAlias(id, typeParameters, right) | ||
``` | ||
See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`. | ||
@@ -1237,4 +1861,9 @@ | ||
### t.typeAnnotation(typeAnnotation) | ||
--- | ||
### typeAnnotation | ||
```javascript | ||
t.typeAnnotation(typeAnnotation) | ||
``` | ||
See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`. | ||
@@ -1246,4 +1875,9 @@ | ||
### t.typeCastExpression(expression, typeAnnotation) | ||
--- | ||
### typeCastExpression | ||
```javascript | ||
t.typeCastExpression(expression, typeAnnotation) | ||
``` | ||
See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`. | ||
@@ -1256,4 +1890,9 @@ | ||
### t.typeParameter(bound) | ||
--- | ||
### typeParameter | ||
```javascript | ||
t.typeParameter(bound) | ||
``` | ||
See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`. | ||
@@ -1265,4 +1904,9 @@ | ||
### t.typeParameterDeclaration(params) | ||
--- | ||
### typeParameterDeclaration | ||
```javascript | ||
t.typeParameterDeclaration(params) | ||
``` | ||
See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`. | ||
@@ -1274,4 +1918,9 @@ | ||
### t.typeParameterInstantiation(params) | ||
--- | ||
### typeParameterInstantiation | ||
```javascript | ||
t.typeParameterInstantiation(params) | ||
``` | ||
See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`. | ||
@@ -1283,4 +1932,9 @@ | ||
### t.typeofTypeAnnotation(argument) | ||
--- | ||
### typeofTypeAnnotation | ||
```javascript | ||
t.typeofTypeAnnotation(argument) | ||
``` | ||
See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`. | ||
@@ -1292,4 +1946,9 @@ | ||
### t.unaryExpression(operator, argument, prefix) | ||
--- | ||
### unaryExpression | ||
```javascript | ||
t.unaryExpression(operator, argument, prefix) | ||
``` | ||
See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`. | ||
@@ -1303,4 +1962,9 @@ | ||
### t.unionTypeAnnotation(types) | ||
--- | ||
### unionTypeAnnotation | ||
```javascript | ||
t.unionTypeAnnotation(types) | ||
``` | ||
See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`. | ||
@@ -1312,4 +1976,9 @@ | ||
### t.updateExpression(operator, argument, prefix) | ||
--- | ||
### updateExpression | ||
```javascript | ||
t.updateExpression(operator, argument, prefix) | ||
``` | ||
See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`. | ||
@@ -1323,4 +1992,9 @@ | ||
### t.variableDeclaration(kind, declarations) | ||
--- | ||
### variableDeclaration | ||
```javascript | ||
t.variableDeclaration(kind, declarations) | ||
``` | ||
See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`. | ||
@@ -1333,4 +2007,9 @@ | ||
### t.variableDeclarator(id, init) | ||
--- | ||
### variableDeclarator | ||
```javascript | ||
t.variableDeclarator(id, init) | ||
``` | ||
See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`. | ||
@@ -1341,4 +2020,9 @@ | ||
### t.voidTypeAnnotation() | ||
--- | ||
### voidTypeAnnotation | ||
```javascript | ||
t.voidTypeAnnotation() | ||
``` | ||
See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`. | ||
@@ -1349,4 +2033,9 @@ | ||
### t.whileStatement(test, body) | ||
--- | ||
### whileStatement | ||
```javascript | ||
t.whileStatement(test, body) | ||
``` | ||
See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`. | ||
@@ -1359,4 +2048,9 @@ | ||
### t.withStatement(object, body) | ||
--- | ||
### withStatement | ||
```javascript | ||
t.withStatement(object, body) | ||
``` | ||
See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`. | ||
@@ -1369,4 +2063,9 @@ | ||
### t.yieldExpression(argument, delegate) | ||
--- | ||
### yieldExpression | ||
```javascript | ||
t.yieldExpression(argument, delegate) | ||
``` | ||
See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`. | ||
@@ -1379,4 +2078,6 @@ | ||
--- | ||
<!-- end generated section --> | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136699
3012
1945
Updatedbabel-runtime@^6.20.0