Socket
Socket
Sign inDemoInstall

babel-types

Package Overview
Dependencies
Maintainers
6
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-types - npm Package Compare versions

Comparing version 6.15.0 to 6.16.0

2

lib/definitions/es2015.js

@@ -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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc