babel-types
Advanced tools
Comparing version 6.15.0 to 6.16.0
@@ -40,3 +40,3 @@ "use strict"; | ||
builder: ["params", "body", "async"], | ||
visitor: ["params", "body", "returnType"], | ||
visitor: ["params", "body", "returnType", "typeParameters"], | ||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], | ||
@@ -43,0 +43,0 @@ fields: { |
@@ -20,2 +20,18 @@ "use strict"; | ||
(0, _index2.default)("ForAwaitStatement", { | ||
visitor: ["left", "right", "body"], | ||
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], | ||
fields: { | ||
left: { | ||
validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") | ||
}, | ||
right: { | ||
validate: (0, _index.assertNodeType)("Expression") | ||
}, | ||
body: { | ||
validate: (0, _index.assertNodeType)("Statement") | ||
} | ||
} | ||
}); | ||
(0, _index2.default)("BindExpression", { | ||
@@ -22,0 +38,0 @@ visitor: ["object", "callee"], |
@@ -43,4 +43,10 @@ "use strict"; | ||
visitor: ["key", "value", "typeAnnotation", "decorators"], | ||
aliases: ["Flow", "Property"], | ||
fields: {} | ||
builder: ["key", "value", "typeAnnotation", "decorators", "computed"], | ||
aliases: ["Property"], | ||
fields: { | ||
computed: { | ||
validate: (0, _index.assertValueType)("boolean"), | ||
default: false | ||
} | ||
} | ||
}); | ||
@@ -47,0 +53,0 @@ |
@@ -115,3 +115,7 @@ "use strict"; | ||
case "ClassProperty": | ||
return parent.value === node; | ||
if (parent.key === node) { | ||
return parent.computed; | ||
} else { | ||
return parent.value === node; | ||
} | ||
@@ -118,0 +122,0 @@ case "ImportDefaultSpecifier": |
{ | ||
"name": "babel-types", | ||
"version": "6.15.0", | ||
"version": "6.16.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", |
@@ -220,3 +220,3 @@ # babel-types | ||
### t.classProperty(key, value, typeAnnotation, decorators) | ||
### t.classProperty(key, value, typeAnnotation, decorators, computed) | ||
@@ -231,2 +231,3 @@ See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`. | ||
- `decorators` (required) | ||
- `computed`: `boolean` (default: `false`) | ||
@@ -233,0 +234,0 @@ ### t.conditionalExpression(test, consequent, alternate) |
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
128410
2951
1226