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 7.0.0-beta.2 to 7.0.0-beta.3

58

lib/constants.js
"use strict";
exports.__esModule = true;
var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"];
var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"];
var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"];
var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"];
var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"];
var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
var INHERIT_KEYS = exports.INHERIT_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 = void 0;
var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
var FLATTENABLE_KEYS = ["body", "expressions"];
exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
var FOR_INIT_KEYS = ["left", "init"];
exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
exports.COMMENT_KEYS = COMMENT_KEYS;
var LOGICAL_OPERATORS = ["||", "&&"];
exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
var UPDATE_OPERATORS = ["++", "--"];
exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
var BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
exports.BINARY_OPERATORS = BINARY_OPERATORS;
var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
var STRING_UNARY_OPERATORS = ["typeof"];
exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
exports.UNARY_OPERATORS = UNARY_OPERATORS;
var INHERIT_KEYS = {
optional: ["typeAnnotation", "typeParameters", "returnType"],
force: ["start", "loc", "end"]
};
var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
exports.INHERIT_KEYS = INHERIT_KEYS;
var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;

@@ -14,14 +14,8 @@ "use strict";

var _isPlainObject = require("lodash/isPlainObject");
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _isRegExp = _interopRequireDefault(require("lodash/isRegExp"));
var _isRegExp = require("lodash/isRegExp");
var t = _interopRequireWildcard(require("./index"));
var _isRegExp2 = _interopRequireDefault(_isRegExp);
var _index = require("./index");
var t = _interopRequireWildcard(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -59,12 +53,12 @@

var _node2 = _ref;
var _node = _ref;
ensureLastUndefined = false;
if (t.isExpression(_node2)) {
exprs.push(_node2);
} else if (t.isExpressionStatement(_node2)) {
exprs.push(_node2.expression);
} else if (t.isVariableDeclaration(_node2)) {
if (_node2.kind !== "var") return;
var _arr = _node2.declarations;
if (t.isExpression(_node)) {
exprs.push(_node);
} else if (t.isExpressionStatement(_node)) {
exprs.push(_node.expression);
} else if (t.isVariableDeclaration(_node)) {
if (_node.kind !== "var") return;
var _arr = _node.declarations;

@@ -75,6 +69,6 @@ for (var _i2 = 0; _i2 < _arr.length; _i2++) {

for (var _key in bindings) {
for (var key in bindings) {
declars.push({
kind: _node2.kind,
id: bindings[_key]
kind: _node.kind,
id: bindings[key]
});

@@ -89,12 +83,12 @@ }

ensureLastUndefined = true;
} else if (t.isIfStatement(_node2)) {
var consequent = _node2.consequent ? gatherSequenceExpressions([_node2.consequent], scope, declars) : scope.buildUndefinedNode();
var alternate = _node2.alternate ? gatherSequenceExpressions([_node2.alternate], scope, declars) : scope.buildUndefinedNode();
} else if (t.isIfStatement(_node)) {
var consequent = _node.consequent ? gatherSequenceExpressions([_node.consequent], scope, declars) : scope.buildUndefinedNode();
var alternate = _node.alternate ? gatherSequenceExpressions([_node.alternate], scope, declars) : scope.buildUndefinedNode();
if (!consequent || !alternate) return;
exprs.push(t.conditionalExpression(_node2.test, consequent, alternate));
} else if (t.isBlockStatement(_node2)) {
var body = gatherSequenceExpressions(_node2.body, scope, declars);
exprs.push(t.conditionalExpression(_node.test, consequent, alternate));
} else if (t.isBlockStatement(_node)) {
var body = gatherSequenceExpressions(_node.body, scope, declars);
if (!body) return;
exprs.push(body);
} else if (t.isEmptyStatement(_node2)) {
} else if (t.isEmptyStatement(_node)) {
ensureLastUndefined = true;

@@ -136,3 +130,3 @@ } else {

var alias = void 0;
var alias;

@@ -197,3 +191,3 @@ if (node.kind === "method") {

var mustHaveId = false;
var newType = void 0;
var newType;

@@ -293,3 +287,3 @@ if (t.isClass(node)) {

if ((0, _isRegExp2.default)(value)) {
if ((0, _isRegExp.default)(value)) {
var pattern = value.source;

@@ -304,15 +298,15 @@ var flags = value.toString().match(/\/([a-z]+|)$/)[1];

if ((0, _isPlainObject2.default)(value)) {
if ((0, _isPlainObject.default)(value)) {
var props = [];
for (var _key2 in value) {
for (var key in value) {
var nodeKey = void 0;
if (t.isValidIdentifier(_key2)) {
nodeKey = t.identifier(_key2);
if (t.isValidIdentifier(key)) {
nodeKey = t.identifier(key);
} else {
nodeKey = t.stringLiteral(_key2);
nodeKey = t.stringLiteral(key);
}
props.push(t.objectProperty(nodeKey, t.valueToNode(value[_key2])));
props.push(t.objectProperty(nodeKey, t.valueToNode(value[key])));
}

@@ -319,0 +313,0 @@

"use strict";
exports.__esModule = true;
exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionCommon = undefined;
exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionCommon = void 0;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var t = _interopRequireWildcard(require("../index"));
var _index = require("../index");
var t = _interopRequireWildcard(_index);
var _constants = require("../constants");
var _index2 = require("./index");
var _index2 = _interopRequireWildcard(require("./index"));
var _index3 = _interopRequireDefault(_index2);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
(0, _index3.default)("ArrayExpression", {
(0, _index2.default)("ArrayExpression", {
fields: {

@@ -32,3 +26,3 @@ elements: {

});
(0, _index3.default)("AssignmentExpression", {
(0, _index2.default)("AssignmentExpression", {
fields: {

@@ -49,7 +43,7 @@ operator: {

});
(0, _index3.default)("BinaryExpression", {
(0, _index2.default)("BinaryExpression", {
builder: ["operator", "left", "right"],
fields: {
operator: {
validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS)
validate: _index2.assertOneOf.apply(void 0, _constants.BINARY_OPERATORS)
},

@@ -66,3 +60,3 @@ left: {

});
(0, _index3.default)("Directive", {
(0, _index2.default)("Directive", {
visitor: ["value"],

@@ -75,3 +69,3 @@ fields: {

});
(0, _index3.default)("DirectiveLiteral", {
(0, _index2.default)("DirectiveLiteral", {
builder: ["value"],

@@ -84,3 +78,3 @@ fields: {

});
(0, _index3.default)("BlockStatement", {
(0, _index2.default)("BlockStatement", {
builder: ["body", "directives"],

@@ -99,3 +93,3 @@ visitor: ["directives", "body"],

});
(0, _index3.default)("BreakStatement", {
(0, _index2.default)("BreakStatement", {
visitor: ["label"],

@@ -110,3 +104,3 @@ fields: {

});
(0, _index3.default)("CallExpression", {
(0, _index2.default)("CallExpression", {
visitor: ["callee", "arguments", "typeParameters"],

@@ -132,3 +126,3 @@ builder: ["callee", "arguments"],

});
(0, _index3.default)("CatchClause", {
(0, _index2.default)("CatchClause", {
visitor: ["param", "body"],

@@ -146,3 +140,3 @@ fields: {

});
(0, _index3.default)("ConditionalExpression", {
(0, _index2.default)("ConditionalExpression", {
visitor: ["test", "consequent", "alternate"],

@@ -162,3 +156,3 @@ fields: {

});
(0, _index3.default)("ContinueStatement", {
(0, _index2.default)("ContinueStatement", {
visitor: ["label"],

@@ -173,6 +167,6 @@ fields: {

});
(0, _index3.default)("DebuggerStatement", {
(0, _index2.default)("DebuggerStatement", {
aliases: ["Statement"]
});
(0, _index3.default)("DoWhileStatement", {
(0, _index2.default)("DoWhileStatement", {
visitor: ["test", "body"],

@@ -189,6 +183,6 @@ fields: {

});
(0, _index3.default)("EmptyStatement", {
(0, _index2.default)("EmptyStatement", {
aliases: ["Statement"]
});
(0, _index3.default)("ExpressionStatement", {
(0, _index2.default)("ExpressionStatement", {
visitor: ["expression"],

@@ -202,3 +196,3 @@ fields: {

});
(0, _index3.default)("File", {
(0, _index2.default)("File", {
builder: ["program", "comments", "tokens"],

@@ -212,3 +206,3 @@ visitor: ["program"],

});
(0, _index3.default)("ForInStatement", {
(0, _index2.default)("ForInStatement", {
visitor: ["left", "right", "body"],

@@ -228,3 +222,3 @@ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],

});
(0, _index3.default)("ForStatement", {
(0, _index2.default)("ForStatement", {
visitor: ["init", "test", "update", "body"],

@@ -250,3 +244,3 @@ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],

});
var functionCommon = exports.functionCommon = {
var functionCommon = {
params: {

@@ -272,4 +266,5 @@ validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal")))

};
exports.functionCommon = functionCommon;
var functionDeclarationCommon = exports.functionDeclarationCommon = _extends({}, functionCommon, {
var functionDeclarationCommon = _extends({}, functionCommon, {
declare: {

@@ -285,3 +280,4 @@ validate: (0, _index2.assertValueType)("boolean"),

(0, _index3.default)("FunctionDeclaration", {
exports.functionDeclarationCommon = functionDeclarationCommon;
(0, _index2.default)("FunctionDeclaration", {
builder: ["id", "params", "body", "generator", "async"],

@@ -296,3 +292,3 @@ visitor: ["id", "params", "body", "returnType", "typeParameters"],

});
(0, _index3.default)("FunctionExpression", {
(0, _index2.default)("FunctionExpression", {
inherits: "FunctionDeclaration",

@@ -310,3 +306,3 @@ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],

});
var patternLikeCommon = exports.patternLikeCommon = {
var patternLikeCommon = {
typeAnnotation: {

@@ -320,3 +316,4 @@ validate: (0, _index2.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),

};
(0, _index3.default)("Identifier", {
exports.patternLikeCommon = patternLikeCommon;
(0, _index2.default)("Identifier", {
builder: ["name"],

@@ -337,3 +334,3 @@ visitor: ["typeAnnotation"],

});
(0, _index3.default)("IfStatement", {
(0, _index2.default)("IfStatement", {
visitor: ["test", "consequent", "alternate"],

@@ -354,3 +351,3 @@ aliases: ["Statement", "Conditional"],

});
(0, _index3.default)("LabeledStatement", {
(0, _index2.default)("LabeledStatement", {
visitor: ["label", "body"],

@@ -367,3 +364,3 @@ aliases: ["Statement"],

});
(0, _index3.default)("StringLiteral", {
(0, _index2.default)("StringLiteral", {
builder: ["value"],

@@ -377,3 +374,3 @@ fields: {

});
(0, _index3.default)("NumericLiteral", {
(0, _index2.default)("NumericLiteral", {
builder: ["value"],

@@ -388,6 +385,6 @@ deprecatedAlias: "NumberLiteral",

});
(0, _index3.default)("NullLiteral", {
(0, _index2.default)("NullLiteral", {
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
});
(0, _index3.default)("BooleanLiteral", {
(0, _index2.default)("BooleanLiteral", {
builder: ["value"],

@@ -401,3 +398,3 @@ fields: {

});
(0, _index3.default)("RegExpLiteral", {
(0, _index2.default)("RegExpLiteral", {
builder: ["pattern", "flags"],

@@ -416,3 +413,3 @@ deprecatedAlias: "RegexLiteral",

});
(0, _index3.default)("LogicalExpression", {
(0, _index2.default)("LogicalExpression", {
builder: ["operator", "left", "right"],

@@ -423,3 +420,3 @@ visitor: ["left", "right"],

operator: {
validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS)
validate: _index2.assertOneOf.apply(void 0, _constants.LOGICAL_OPERATORS)
},

@@ -434,3 +431,3 @@ left: {

});
(0, _index3.default)("MemberExpression", {
(0, _index2.default)("MemberExpression", {
builder: ["object", "property", "computed", "optional"],

@@ -462,6 +459,6 @@ visitor: ["object", "property"],

});
(0, _index3.default)("NewExpression", {
(0, _index2.default)("NewExpression", {
inherits: "CallExpression"
});
(0, _index3.default)("Program", {
(0, _index2.default)("Program", {
visitor: ["directives", "body"],

@@ -487,3 +484,3 @@ builder: ["body", "directives", "sourceType"],

});
(0, _index3.default)("ObjectExpression", {
(0, _index2.default)("ObjectExpression", {
visitor: ["properties"],

@@ -497,3 +494,3 @@ aliases: ["Expression"],

});
(0, _index3.default)("ObjectMethod", {
(0, _index2.default)("ObjectMethod", {
builder: ["kind", "key", "params", "body", "computed"],

@@ -529,3 +526,3 @@ fields: _extends({}, functionCommon, {

});
(0, _index3.default)("ObjectProperty", {
(0, _index2.default)("ObjectProperty", {
builder: ["key", "value", "computed", "shorthand", "decorators"],

@@ -562,3 +559,3 @@ fields: {

});
(0, _index3.default)("RestElement", {
(0, _index2.default)("RestElement", {
visitor: ["argument", "typeAnnotation"],

@@ -573,3 +570,3 @@ builder: ["argument"],

});
(0, _index3.default)("ReturnStatement", {
(0, _index2.default)("ReturnStatement", {
visitor: ["argument"],

@@ -584,3 +581,3 @@ aliases: ["Statement", "Terminatorless", "CompletionStatement"],

});
(0, _index3.default)("SequenceExpression", {
(0, _index2.default)("SequenceExpression", {
visitor: ["expressions"],

@@ -594,3 +591,3 @@ fields: {

});
(0, _index3.default)("SwitchCase", {
(0, _index2.default)("SwitchCase", {
visitor: ["test", "consequent"],

@@ -607,3 +604,3 @@ fields: {

});
(0, _index3.default)("SwitchStatement", {
(0, _index2.default)("SwitchStatement", {
visitor: ["discriminant", "cases"],

@@ -620,6 +617,6 @@ aliases: ["Statement", "BlockParent", "Scopable"],

});
(0, _index3.default)("ThisExpression", {
(0, _index2.default)("ThisExpression", {
aliases: ["Expression"]
});
(0, _index3.default)("ThrowStatement", {
(0, _index2.default)("ThrowStatement", {
visitor: ["argument"],

@@ -633,3 +630,3 @@ aliases: ["Statement", "Terminatorless", "CompletionStatement"],

});
(0, _index3.default)("TryStatement", {
(0, _index2.default)("TryStatement", {
visitor: ["block", "handler", "finalizer"],

@@ -651,3 +648,3 @@ aliases: ["Statement"],

});
(0, _index3.default)("UnaryExpression", {
(0, _index2.default)("UnaryExpression", {
builder: ["operator", "argument", "prefix"],

@@ -662,3 +659,3 @@ fields: {

operator: {
validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS)
validate: _index2.assertOneOf.apply(void 0, _constants.UNARY_OPERATORS)
}

@@ -669,3 +666,3 @@ },

});
(0, _index3.default)("UpdateExpression", {
(0, _index2.default)("UpdateExpression", {
builder: ["operator", "argument", "prefix"],

@@ -680,3 +677,3 @@ fields: {

operator: {
validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS)
validate: _index2.assertOneOf.apply(void 0, _constants.UPDATE_OPERATORS)
}

@@ -687,3 +684,3 @@ },

});
(0, _index3.default)("VariableDeclaration", {
(0, _index2.default)("VariableDeclaration", {
builder: ["kind", "declarations"],

@@ -705,3 +702,3 @@ visitor: ["declarations"],

});
(0, _index3.default)("VariableDeclarator", {
(0, _index2.default)("VariableDeclarator", {
visitor: ["id", "init"],

@@ -718,3 +715,3 @@ fields: {

});
(0, _index3.default)("WhileStatement", {
(0, _index2.default)("WhileStatement", {
visitor: ["test", "body"],

@@ -731,3 +728,3 @@ aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],

});
(0, _index3.default)("WithStatement", {
(0, _index2.default)("WithStatement", {
visitor: ["object", "body"],

@@ -734,0 +731,0 @@ aliases: ["Statement"],

"use strict";
exports.__esModule = true;
exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = undefined;
exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _index = _interopRequireWildcard(require("./index"));
var _index = require("./index");
var _core = require("./core");
var _index2 = _interopRequireDefault(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var _core = require("./core");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _index2.default)("AssignmentPattern", {
(0, _index.default)("AssignmentPattern", {
visitor: ["left", "right"],

@@ -32,3 +30,3 @@ builder: ["left", "right"],

});
(0, _index2.default)("ArrayPattern", {
(0, _index.default)("ArrayPattern", {
visitor: ["elements", "typeAnnotation"],

@@ -46,3 +44,3 @@ builder: ["elements"],

});
(0, _index2.default)("ArrowFunctionExpression", {
(0, _index.default)("ArrowFunctionExpression", {
builder: ["params", "body", "async"],

@@ -60,3 +58,3 @@ visitor: ["params", "body", "returnType", "typeParameters"],

});
(0, _index2.default)("ClassBody", {
(0, _index.default)("ClassBody", {
visitor: ["body"],

@@ -90,3 +88,3 @@ fields: {

};
(0, _index2.default)("ClassDeclaration", {
(0, _index.default)("ClassDeclaration", {
builder: ["id", "superClass", "body", "decorators"],

@@ -114,3 +112,3 @@ visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],

});
(0, _index2.default)("ClassExpression", {
(0, _index.default)("ClassExpression", {
inherits: "ClassDeclaration",

@@ -136,3 +134,3 @@ aliases: ["Scopable", "Class", "Expression", "Pureish"],

});
(0, _index2.default)("ExportAllDeclaration", {
(0, _index.default)("ExportAllDeclaration", {
visitor: ["source"],

@@ -146,3 +144,3 @@ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],

});
(0, _index2.default)("ExportDefaultDeclaration", {
(0, _index.default)("ExportDefaultDeclaration", {
visitor: ["declaration"],

@@ -156,3 +154,3 @@ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],

});
(0, _index2.default)("ExportNamedDeclaration", {
(0, _index.default)("ExportNamedDeclaration", {
visitor: ["declaration", "specifiers", "source"],

@@ -174,3 +172,3 @@ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],

});
(0, _index2.default)("ExportSpecifier", {
(0, _index.default)("ExportSpecifier", {
visitor: ["local", "exported"],

@@ -187,3 +185,3 @@ aliases: ["ModuleSpecifier"],

});
(0, _index2.default)("ForOfStatement", {
(0, _index.default)("ForOfStatement", {
visitor: ["left", "right", "body"],

@@ -207,3 +205,3 @@ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],

});
(0, _index2.default)("ImportDeclaration", {
(0, _index.default)("ImportDeclaration", {
visitor: ["specifiers", "source"],

@@ -220,3 +218,3 @@ aliases: ["Statement", "Declaration", "ModuleDeclaration"],

});
(0, _index2.default)("ImportDefaultSpecifier", {
(0, _index.default)("ImportDefaultSpecifier", {
visitor: ["local"],

@@ -230,3 +228,3 @@ aliases: ["ModuleSpecifier"],

});
(0, _index2.default)("ImportNamespaceSpecifier", {
(0, _index.default)("ImportNamespaceSpecifier", {
visitor: ["local"],

@@ -240,3 +238,3 @@ aliases: ["ModuleSpecifier"],

});
(0, _index2.default)("ImportSpecifier", {
(0, _index.default)("ImportSpecifier", {
visitor: ["local", "imported"],

@@ -256,3 +254,3 @@ aliases: ["ModuleSpecifier"],

});
(0, _index2.default)("MetaProperty", {
(0, _index.default)("MetaProperty", {
visitor: ["meta", "property"],

@@ -269,3 +267,3 @@ aliases: ["Expression"],

});
var classMethodOrPropertyCommon = exports.classMethodOrPropertyCommon = {
var classMethodOrPropertyCommon = {
abstract: {

@@ -302,4 +300,5 @@ validate: (0, _index.assertValueType)("boolean"),

};
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
var classMethodOrDeclareMethodCommon = exports.classMethodOrDeclareMethodCommon = _extends({}, _core.functionCommon, classMethodOrPropertyCommon, {
var classMethodOrDeclareMethodCommon = _extends({}, _core.functionCommon, classMethodOrPropertyCommon, {
kind: {

@@ -319,3 +318,4 @@ validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")),

(0, _index2.default)("ClassMethod", {
exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
(0, _index.default)("ClassMethod", {
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],

@@ -330,3 +330,3 @@ builder: ["kind", "key", "params", "body", "computed", "static"],

});
(0, _index2.default)("ObjectPattern", {
(0, _index.default)("ObjectPattern", {
visitor: ["properties", "typeAnnotation"],

@@ -341,3 +341,3 @@ builder: ["properties"],

});
(0, _index2.default)("SpreadElement", {
(0, _index.default)("SpreadElement", {
visitor: ["argument"],

@@ -351,6 +351,6 @@ aliases: ["UnaryLike"],

});
(0, _index2.default)("Super", {
(0, _index.default)("Super", {
aliases: ["Expression"]
});
(0, _index2.default)("TaggedTemplateExpression", {
(0, _index.default)("TaggedTemplateExpression", {
visitor: ["tag", "quasi"],

@@ -367,3 +367,3 @@ aliases: ["Expression"],

});
(0, _index2.default)("TemplateElement", {
(0, _index.default)("TemplateElement", {
builder: ["value", "tail"],

@@ -378,3 +378,3 @@ fields: {

});
(0, _index2.default)("TemplateLiteral", {
(0, _index.default)("TemplateLiteral", {
visitor: ["quasis", "expressions"],

@@ -391,3 +391,3 @@ aliases: ["Expression", "Literal"],

});
(0, _index2.default)("YieldExpression", {
(0, _index.default)("YieldExpression", {
builder: ["argument", "delegate"],

@@ -394,0 +394,0 @@ visitor: ["argument"],

"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _index = _interopRequireWildcard(require("./index"));
var _index = require("./index");
var _es = require("./es2015");
var _index2 = _interopRequireDefault(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var _es = require("./es2015");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _index2.default)("AwaitExpression", {
(0, _index.default)("AwaitExpression", {
builder: ["argument"],

@@ -23,3 +21,3 @@ visitor: ["argument"],

});
(0, _index2.default)("BindExpression", {
(0, _index.default)("BindExpression", {
visitor: ["object", "callee"],

@@ -29,3 +27,3 @@ aliases: ["Expression"],

});
(0, _index2.default)("ClassProperty", {
(0, _index.default)("ClassProperty", {
visitor: ["key", "value", "typeAnnotation", "decorators"],

@@ -53,6 +51,6 @@ builder: ["key", "value", "typeAnnotation", "decorators", "computed"],

});
(0, _index2.default)("Import", {
(0, _index.default)("Import", {
aliases: ["Expression"]
});
(0, _index2.default)("Decorator", {
(0, _index.default)("Decorator", {
visitor: ["expression"],

@@ -65,3 +63,3 @@ fields: {

});
(0, _index2.default)("DoExpression", {
(0, _index.default)("DoExpression", {
visitor: ["body"],

@@ -75,3 +73,3 @@ aliases: ["Expression"],

});
(0, _index2.default)("ExportDefaultSpecifier", {
(0, _index.default)("ExportDefaultSpecifier", {
visitor: ["exported"],

@@ -85,3 +83,3 @@ aliases: ["ModuleSpecifier"],

});
(0, _index2.default)("ExportNamespaceSpecifier", {
(0, _index.default)("ExportNamespaceSpecifier", {
visitor: ["exported"],

@@ -88,0 +86,0 @@ aliases: ["ModuleSpecifier"],

"use strict";
var _index = require("./index");
var _index = _interopRequireWildcard(require("./index"));
var _index2 = _interopRequireDefault(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _index2.default)("AnyTypeAnnotation", {
(0, _index.default)("AnyTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("ArrayTypeAnnotation", {
(0, _index.default)("ArrayTypeAnnotation", {
visitor: ["elementType"],

@@ -18,15 +16,15 @@ aliases: ["Flow"],

});
(0, _index2.default)("BooleanTypeAnnotation", {
(0, _index.default)("BooleanTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("BooleanLiteralTypeAnnotation", {
(0, _index.default)("BooleanLiteralTypeAnnotation", {
aliases: ["Flow"],
fields: {}
});
(0, _index2.default)("NullLiteralTypeAnnotation", {
(0, _index.default)("NullLiteralTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("ClassImplements", {
(0, _index.default)("ClassImplements", {
visitor: ["id", "typeParameters"],

@@ -36,3 +34,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("DeclareClass", {
(0, _index.default)("DeclareClass", {
visitor: ["id", "typeParameters", "extends", "body"],

@@ -42,3 +40,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareFunction", {
(0, _index.default)("DeclareFunction", {
visitor: ["id"],

@@ -48,3 +46,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareInterface", {
(0, _index.default)("DeclareInterface", {
visitor: ["id", "typeParameters", "extends", "body"],

@@ -54,3 +52,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareModule", {
(0, _index.default)("DeclareModule", {
visitor: ["id", "body"],

@@ -60,3 +58,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareModuleExports", {
(0, _index.default)("DeclareModuleExports", {
visitor: ["typeAnnotation"],

@@ -66,3 +64,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareTypeAlias", {
(0, _index.default)("DeclareTypeAlias", {
visitor: ["id", "typeParameters", "right"],

@@ -72,3 +70,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareOpaqueType", {
(0, _index.default)("DeclareOpaqueType", {
visitor: ["id", "typeParameters", "supertype"],

@@ -78,3 +76,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareVariable", {
(0, _index.default)("DeclareVariable", {
visitor: ["id"],

@@ -84,3 +82,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareExportDeclaration", {
(0, _index.default)("DeclareExportDeclaration", {
visitor: ["declaration", "specifiers", "source"],

@@ -90,3 +88,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclareExportAllDeclaration", {
(0, _index.default)("DeclareExportAllDeclaration", {
visitor: ["source"],

@@ -96,3 +94,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("DeclaredPredicate", {
(0, _index.default)("DeclaredPredicate", {
visitor: ["value"],

@@ -102,6 +100,6 @@ aliases: ["Flow", "FlowPredicate"],

});
(0, _index2.default)("ExistsTypeAnnotation", {
(0, _index.default)("ExistsTypeAnnotation", {
aliases: ["Flow"]
});
(0, _index2.default)("FunctionTypeAnnotation", {
(0, _index.default)("FunctionTypeAnnotation", {
visitor: ["typeParameters", "params", "rest", "returnType"],

@@ -111,3 +109,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("FunctionTypeParam", {
(0, _index.default)("FunctionTypeParam", {
visitor: ["name", "typeAnnotation"],

@@ -117,3 +115,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("GenericTypeAnnotation", {
(0, _index.default)("GenericTypeAnnotation", {
visitor: ["id", "typeParameters"],

@@ -123,7 +121,7 @@ aliases: ["Flow"],

});
(0, _index2.default)("InferredPredicate", {
(0, _index.default)("InferredPredicate", {
aliases: ["Flow", "FlowPredicate"],
fields: {}
});
(0, _index2.default)("InterfaceExtends", {
(0, _index.default)("InterfaceExtends", {
visitor: ["id", "typeParameters"],

@@ -133,3 +131,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("InterfaceDeclaration", {
(0, _index.default)("InterfaceDeclaration", {
visitor: ["id", "typeParameters", "extends", "body"],

@@ -139,3 +137,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("IntersectionTypeAnnotation", {
(0, _index.default)("IntersectionTypeAnnotation", {
visitor: ["types"],

@@ -145,9 +143,9 @@ aliases: ["Flow"],

});
(0, _index2.default)("MixedTypeAnnotation", {
(0, _index.default)("MixedTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"]
});
(0, _index2.default)("EmptyTypeAnnotation", {
(0, _index.default)("EmptyTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"]
});
(0, _index2.default)("NullableTypeAnnotation", {
(0, _index.default)("NullableTypeAnnotation", {
visitor: ["typeAnnotation"],

@@ -157,11 +155,11 @@ aliases: ["Flow"],

});
(0, _index2.default)("NumberLiteralTypeAnnotation", {
(0, _index.default)("NumberLiteralTypeAnnotation", {
aliases: ["Flow"],
fields: {}
});
(0, _index2.default)("NumberTypeAnnotation", {
(0, _index.default)("NumberTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("ObjectTypeAnnotation", {
(0, _index.default)("ObjectTypeAnnotation", {
visitor: ["properties", "indexers", "callProperties"],

@@ -171,3 +169,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("ObjectTypeCallProperty", {
(0, _index.default)("ObjectTypeCallProperty", {
visitor: ["value"],

@@ -177,3 +175,3 @@ aliases: ["Flow", "UserWhitespacable"],

});
(0, _index2.default)("ObjectTypeIndexer", {
(0, _index.default)("ObjectTypeIndexer", {
visitor: ["id", "key", "value"],

@@ -183,3 +181,3 @@ aliases: ["Flow", "UserWhitespacable"],

});
(0, _index2.default)("ObjectTypeProperty", {
(0, _index.default)("ObjectTypeProperty", {
visitor: ["key", "value"],

@@ -189,3 +187,3 @@ aliases: ["Flow", "UserWhitespacable"],

});
(0, _index2.default)("ObjectTypeSpreadProperty", {
(0, _index.default)("ObjectTypeSpreadProperty", {
visitor: ["argument"],

@@ -195,3 +193,3 @@ aliases: ["Flow", "UserWhitespacable"],

});
(0, _index2.default)("OpaqueType", {
(0, _index.default)("OpaqueType", {
visitor: ["id", "typeParameters", "supertype", "impltype"],

@@ -201,3 +199,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("QualifiedTypeIdentifier", {
(0, _index.default)("QualifiedTypeIdentifier", {
visitor: ["id", "qualification"],

@@ -207,15 +205,15 @@ aliases: ["Flow"],

});
(0, _index2.default)("StringLiteralTypeAnnotation", {
(0, _index.default)("StringLiteralTypeAnnotation", {
aliases: ["Flow"],
fields: {}
});
(0, _index2.default)("StringTypeAnnotation", {
(0, _index.default)("StringTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("ThisTypeAnnotation", {
(0, _index.default)("ThisTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
(0, _index2.default)("TupleTypeAnnotation", {
(0, _index.default)("TupleTypeAnnotation", {
visitor: ["types"],

@@ -225,3 +223,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("TypeofTypeAnnotation", {
(0, _index.default)("TypeofTypeAnnotation", {
visitor: ["argument"],

@@ -231,3 +229,3 @@ aliases: ["Flow"],

});
(0, _index2.default)("TypeAlias", {
(0, _index.default)("TypeAlias", {
visitor: ["id", "typeParameters", "right"],

@@ -237,3 +235,3 @@ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],

});
(0, _index2.default)("TypeAnnotation", {
(0, _index.default)("TypeAnnotation", {
aliases: ["Flow"],

@@ -247,3 +245,3 @@ visitor: ["typeAnnotation"],

});
(0, _index2.default)("TypeCastExpression", {
(0, _index.default)("TypeCastExpression", {
visitor: ["expression", "typeAnnotation"],

@@ -253,3 +251,3 @@ aliases: ["Flow", "ExpressionWrapper", "Expression"],

});
(0, _index2.default)("TypeParameter", {
(0, _index.default)("TypeParameter", {
aliases: ["Flow"],

@@ -271,3 +269,3 @@ visitor: ["bound", "default"],

});
(0, _index2.default)("TypeParameterDeclaration", {
(0, _index.default)("TypeParameterDeclaration", {
aliases: ["Flow"],

@@ -281,3 +279,3 @@ visitor: ["params"],

});
(0, _index2.default)("TypeParameterInstantiation", {
(0, _index.default)("TypeParameterInstantiation", {
aliases: ["Flow"],

@@ -291,3 +289,3 @@ visitor: ["params"],

});
(0, _index2.default)("UnionTypeAnnotation", {
(0, _index.default)("UnionTypeAnnotation", {
visitor: ["types"],

@@ -297,5 +295,5 @@ aliases: ["Flow"],

});
(0, _index2.default)("VoidTypeAnnotation", {
(0, _index.default)("VoidTypeAnnotation", {
aliases: ["Flow", "FlowBaseAnnotation"],
fields: {}
});
"use strict";
exports.__esModule = true;
exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.assertEach = assertEach;

@@ -15,15 +11,21 @@ exports.assertOneOf = assertOneOf;

exports.default = defineType;
exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
var _index = require("../index");
var t = _interopRequireWildcard(require("../index"));
var t = _interopRequireWildcard(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var VISITOR_KEYS = exports.VISITOR_KEYS = {};
var ALIAS_KEYS = exports.ALIAS_KEYS = {};
var NODE_FIELDS = exports.NODE_FIELDS = {};
var BUILDER_KEYS = exports.BUILDER_KEYS = {};
var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {};
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var VISITOR_KEYS = {};
exports.VISITOR_KEYS = VISITOR_KEYS;
var ALIAS_KEYS = {};
exports.ALIAS_KEYS = ALIAS_KEYS;
var NODE_FIELDS = {};
exports.NODE_FIELDS = NODE_FIELDS;
var BUILDER_KEYS = {};
exports.BUILDER_KEYS = BUILDER_KEYS;
var DEPRECATED_KEYS = {};
exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
function getType(val) {

@@ -55,3 +57,3 @@ if (Array.isArray(val)) {

function assertOneOf() {
for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
for (var _len = arguments.length, vals = new Array(_len), _key = 0; _key < _len; _key++) {
vals[_key] = arguments[_key];

@@ -71,3 +73,3 @@ }

function assertNodeType() {
for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
types[_key2] = arguments[_key2];

@@ -98,3 +100,3 @@ }

function assertNodeOrValueType() {
for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
types[_key3] = arguments[_key3];

@@ -138,3 +140,3 @@ }

function chain() {
for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
fns[_key4] = arguments[_key4];

@@ -146,3 +148,3 @@ }

var fn = fns[_i3];
fn.apply(undefined, arguments);
fn.apply(void 0, arguments);
}

@@ -149,0 +151,0 @@ }

"use strict";
var _index = require("./index");
var _index = _interopRequireWildcard(require("./index"));
var _index2 = _interopRequireDefault(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _index2.default)("JSXAttribute", {
(0, _index.default)("JSXAttribute", {
visitor: ["name", "value"],

@@ -22,3 +20,3 @@ aliases: ["JSX", "Immutable"],

});
(0, _index2.default)("JSXClosingElement", {
(0, _index.default)("JSXClosingElement", {
visitor: ["name"],

@@ -32,3 +30,3 @@ aliases: ["JSX", "Immutable"],

});
(0, _index2.default)("JSXElement", {
(0, _index.default)("JSXElement", {
builder: ["openingElement", "closingElement", "children", "selfClosing"],

@@ -50,6 +48,6 @@ visitor: ["openingElement", "children", "closingElement"],

});
(0, _index2.default)("JSXEmptyExpression", {
(0, _index.default)("JSXEmptyExpression", {
aliases: ["JSX", "Expression"]
});
(0, _index2.default)("JSXExpressionContainer", {
(0, _index.default)("JSXExpressionContainer", {
visitor: ["expression"],

@@ -63,3 +61,3 @@ aliases: ["JSX", "Immutable"],

});
(0, _index2.default)("JSXSpreadChild", {
(0, _index.default)("JSXSpreadChild", {
visitor: ["expression"],

@@ -73,3 +71,3 @@ aliases: ["JSX", "Immutable"],

});
(0, _index2.default)("JSXIdentifier", {
(0, _index.default)("JSXIdentifier", {
builder: ["name"],

@@ -83,3 +81,3 @@ aliases: ["JSX", "Expression"],

});
(0, _index2.default)("JSXMemberExpression", {
(0, _index.default)("JSXMemberExpression", {
visitor: ["object", "property"],

@@ -96,3 +94,3 @@ aliases: ["JSX", "Expression"],

});
(0, _index2.default)("JSXNamespacedName", {
(0, _index.default)("JSXNamespacedName", {
visitor: ["namespace", "name"],

@@ -109,3 +107,3 @@ aliases: ["JSX"],

});
(0, _index2.default)("JSXOpeningElement", {
(0, _index.default)("JSXOpeningElement", {
builder: ["name", "attributes", "selfClosing"],

@@ -127,3 +125,3 @@ visitor: ["name", "attributes"],

});
(0, _index2.default)("JSXSpreadAttribute", {
(0, _index.default)("JSXSpreadAttribute", {
visitor: ["argument"],

@@ -137,3 +135,3 @@ aliases: ["JSX"],

});
(0, _index2.default)("JSXText", {
(0, _index.default)("JSXText", {
aliases: ["JSX", "Immutable"],

@@ -140,0 +138,0 @@ builder: ["value"],

"use strict";
var _index = require("./index");
var _index = _interopRequireWildcard(require("./index"));
var _index2 = _interopRequireDefault(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _index2.default)("Noop", {
(0, _index.default)("Noop", {
visitor: []
});
(0, _index2.default)("ParenthesizedExpression", {
(0, _index.default)("ParenthesizedExpression", {
visitor: ["expression"],

@@ -14,0 +12,0 @@ aliases: ["Expression", "ExpressionWrapper"],

"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _index = _interopRequireWildcard(require("./index"));
var _index = require("./index");
var _index2 = _interopRequireDefault(_index);
var _core = require("./core");

@@ -13,4 +9,6 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var bool = (0, _index.assertValueType)("boolean");

@@ -25,3 +23,3 @@

function typeIs(typeName) {
return typeof typeName === "string" ? (0, _index.assertNodeType)(typeName) : _index.assertNodeType.apply(undefined, typeName);
return typeof typeName === "string" ? (0, _index.assertNodeType)(typeName) : _index.assertNodeType.apply(void 0, typeName);
}

@@ -59,3 +57,3 @@

(0, _index2.default)("TSParameterProperty", {
(0, _index.default)("TSParameterProperty", {
aliases: ["LVal"],

@@ -77,3 +75,3 @@ visitor: ["parameter"],

});
(0, _index2.default)("TSDeclareFunction", {
(0, _index.default)("TSDeclareFunction", {
aliases: ["Statement", "Declaration"],

@@ -83,7 +81,7 @@ visitor: ["id", "typeParameters", "params", "returnType"],

});
(0, _index2.default)("TSDeclareMethod", {
(0, _index.default)("TSDeclareMethod", {
visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
fields: _es.classMethodOrDeclareMethodCommon
});
(0, _index2.default)("TSQualifiedName", {
(0, _index.default)("TSQualifiedName", {
aliases: ["TSEntityName"],

@@ -106,4 +104,4 @@ visitor: ["left", "right"],

};
(0, _index2.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
(0, _index2.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
(0, _index.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
(0, _index.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
var namedTypeElementCommon = {

@@ -114,3 +112,3 @@ key: validateType("Expression"),

};
(0, _index2.default)("TSPropertySignature", {
(0, _index.default)("TSPropertySignature", {
aliases: ["TSTypeElement"],

@@ -124,3 +122,3 @@ visitor: ["key", "typeAnnotation", "initializer"],

});
(0, _index2.default)("TSMethodSignature", {
(0, _index.default)("TSMethodSignature", {
aliases: ["TSTypeElement"],

@@ -130,3 +128,3 @@ visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],

});
(0, _index2.default)("TSIndexSignature", {
(0, _index.default)("TSIndexSignature", {
aliases: ["TSTypeElement"],

@@ -144,3 +142,3 @@ visitor: ["parameters", "typeAnnotation"],

var type = tsKeywordTypes[_i];
(0, _index2.default)(type, {
(0, _index.default)(type, {
aliases: ["TSType"],

@@ -152,3 +150,3 @@ visitor: [],

(0, _index2.default)("TSThisType", {
(0, _index.default)("TSThisType", {
aliases: ["TSType"],

@@ -163,5 +161,5 @@ visitor: [],

};
(0, _index2.default)("TSFunctionType", fnOrCtr);
(0, _index2.default)("TSConstructorType", fnOrCtr);
(0, _index2.default)("TSTypeReference", {
(0, _index.default)("TSFunctionType", fnOrCtr);
(0, _index.default)("TSConstructorType", fnOrCtr);
(0, _index.default)("TSTypeReference", {
aliases: ["TSType"],

@@ -174,3 +172,3 @@ visitor: ["typeName", "typeParameters"],

});
(0, _index2.default)("TSTypePredicate", {
(0, _index.default)("TSTypePredicate", {
aliases: ["TSType"],

@@ -183,3 +181,3 @@ visitor: ["parameterName", "typeAnnotation"],

});
(0, _index2.default)("TSTypeQuery", {
(0, _index.default)("TSTypeQuery", {
aliases: ["TSType"],

@@ -191,3 +189,3 @@ visitor: ["exprName"],

});
(0, _index2.default)("TSTypeLiteral", {
(0, _index.default)("TSTypeLiteral", {
aliases: ["TSType"],

@@ -199,3 +197,3 @@ visitor: ["members"],

});
(0, _index2.default)("TSArrayType", {
(0, _index.default)("TSArrayType", {
aliases: ["TSType"],

@@ -207,3 +205,3 @@ visitor: ["elementType"],

});
(0, _index2.default)("TSTupleType", {
(0, _index.default)("TSTupleType", {
aliases: ["TSType"],

@@ -222,5 +220,5 @@ visitor: ["elementTypes"],

};
(0, _index2.default)("TSUnionType", unionOrIntersection);
(0, _index2.default)("TSIntersectionType", unionOrIntersection);
(0, _index2.default)("TSParenthesizedType", {
(0, _index.default)("TSUnionType", unionOrIntersection);
(0, _index.default)("TSIntersectionType", unionOrIntersection);
(0, _index.default)("TSParenthesizedType", {
aliases: ["TSType"],

@@ -232,3 +230,3 @@ visitor: ["typeAnnotation"],

});
(0, _index2.default)("TSTypeOperator", {
(0, _index.default)("TSTypeOperator", {
aliases: ["TSType"],

@@ -241,3 +239,3 @@ visitor: ["typeAnnotation"],

});
(0, _index2.default)("TSIndexedAccessType", {
(0, _index.default)("TSIndexedAccessType", {
aliases: ["TSType"],

@@ -250,3 +248,3 @@ visitor: ["objectType", "indexType"],

});
(0, _index2.default)("TSMappedType", {
(0, _index.default)("TSMappedType", {
aliases: ["TSType"],

@@ -261,3 +259,3 @@ visitor: ["typeParameter", "typeAnnotation"],

});
(0, _index2.default)("TSLiteralType", {
(0, _index.default)("TSLiteralType", {
aliases: ["TSType"],

@@ -269,3 +267,3 @@ visitor: ["literal"],

});
(0, _index2.default)("TSExpressionWithTypeArguments", {
(0, _index.default)("TSExpressionWithTypeArguments", {
aliases: ["TSType"],

@@ -278,3 +276,3 @@ visitor: ["expression", "typeParameters"],

});
(0, _index2.default)("TSInterfaceDeclaration", {
(0, _index.default)("TSInterfaceDeclaration", {
aliases: ["Statement", "Declaration"],

@@ -290,3 +288,3 @@ visitor: ["id", "typeParameters", "extends", "body"],

});
(0, _index2.default)("TSInterfaceBody", {
(0, _index.default)("TSInterfaceBody", {
visitor: ["body"],

@@ -297,3 +295,3 @@ fields: {

});
(0, _index2.default)("TSTypeAliasDeclaration", {
(0, _index.default)("TSTypeAliasDeclaration", {
aliases: ["Statement", "Declaration"],

@@ -308,3 +306,3 @@ visitor: ["id", "typeParameters", "typeAnnotation"],

});
(0, _index2.default)("TSAsExpression", {
(0, _index.default)("TSAsExpression", {
aliases: ["Expression"],

@@ -317,3 +315,3 @@ visitor: ["expression", "typeAnnotation"],

});
(0, _index2.default)("TSTypeAssertion", {
(0, _index.default)("TSTypeAssertion", {
aliases: ["Expression"],

@@ -326,3 +324,3 @@ visitor: ["typeAnnotation", "expression"],

});
(0, _index2.default)("TSEnumDeclaration", {
(0, _index.default)("TSEnumDeclaration", {
aliases: ["Statement", "Declaration"],

@@ -338,3 +336,3 @@ visitor: ["id", "members"],

});
(0, _index2.default)("TSEnumMember", {
(0, _index.default)("TSEnumMember", {
visitor: ["id", "initializer"],

@@ -346,3 +344,3 @@ fields: {

});
(0, _index2.default)("TSModuleDeclaration", {
(0, _index.default)("TSModuleDeclaration", {
aliases: ["Statement", "Declaration"],

@@ -357,3 +355,3 @@ visitor: ["id", "body"],

});
(0, _index2.default)("TSModuleBlock", {
(0, _index.default)("TSModuleBlock", {
visitor: ["body"],

@@ -364,3 +362,3 @@ fields: {

});
(0, _index2.default)("TSImportEqualsDeclaration", {
(0, _index.default)("TSImportEqualsDeclaration", {
aliases: ["Statement"],

@@ -374,3 +372,3 @@ visitor: ["id", "moduleReference"],

});
(0, _index2.default)("TSExternalModuleReference", {
(0, _index.default)("TSExternalModuleReference", {
visitor: ["expression"],

@@ -381,3 +379,3 @@ fields: {

});
(0, _index2.default)("TSNonNullExpression", {
(0, _index.default)("TSNonNullExpression", {
aliases: ["Expression"],

@@ -389,3 +387,3 @@ visitor: ["expression"],

});
(0, _index2.default)("TSExportAssignment", {
(0, _index.default)("TSExportAssignment", {
aliases: ["Statement"],

@@ -397,3 +395,3 @@ visitor: ["expression"],

});
(0, _index2.default)("TSNamespaceExportDeclaration", {
(0, _index.default)("TSNamespaceExportDeclaration", {
aliases: ["Statement"],

@@ -405,3 +403,3 @@ visitor: ["id"],

});
(0, _index2.default)("TSTypeAnnotation", {
(0, _index.default)("TSTypeAnnotation", {
visitor: ["typeAnnotation"],

@@ -414,3 +412,3 @@ fields: {

});
(0, _index2.default)("TSTypeParameterInstantiation", {
(0, _index.default)("TSTypeParameterInstantiation", {
visitor: ["params"],

@@ -423,3 +421,3 @@ fields: {

});
(0, _index2.default)("TSTypeParameterDeclaration", {
(0, _index.default)("TSTypeParameterDeclaration", {
visitor: ["params"],

@@ -432,3 +430,3 @@ fields: {

});
(0, _index2.default)("TSTypeParameter", {
(0, _index.default)("TSTypeParameter", {
visitor: ["constraint", "default"],

@@ -435,0 +433,0 @@ fields: {

@@ -8,6 +8,4 @@ "use strict";

var _index = require("./index");
var t = _interopRequireWildcard(require("./index"));
var t = _interopRequireWildcard(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -14,0 +12,0 @@

"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.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 _constants = require("./constants");
exports.isRestProperty = isRestProperty;
exports.isSpreadProperty = isSpreadProperty;
exports.is = is;
exports.isType = isType;
exports.validate = validate;
exports.shallowEqual = shallowEqual;
exports.appendToMemberExpression = appendToMemberExpression;
exports.prependToMemberExpression = prependToMemberExpression;
exports.ensureBlock = ensureBlock;
exports.clone = clone;
exports.cloneWithoutLoc = cloneWithoutLoc;
exports.cloneDeep = cloneDeep;
exports.matchesPattern = matchesPattern;
exports.buildMatchMemberExpression = buildMatchMemberExpression;
exports.addComment = addComment;
exports.addComments = addComments;
exports.removeComments = removeComments;
exports.inheritsComments = inheritsComments;
exports.inheritTrailingComments = inheritTrailingComments;
exports.inheritLeadingComments = inheritLeadingComments;
exports.inheritInnerComments = inheritInnerComments;
exports.inherits = inherits;
exports.assertNode = assertNode;
exports.isNode = isNode;
exports.traverseFast = traverseFast;
exports.removeProperties = removeProperties;
exports.removePropertiesDeep = removePropertiesDeep;
Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", {

@@ -122,32 +145,32 @@ enumerable: true,

});
exports.isRestProperty = isRestProperty;
exports.isSpreadProperty = isSpreadProperty;
exports.is = is;
exports.isType = isType;
exports.validate = validate;
exports.shallowEqual = shallowEqual;
exports.appendToMemberExpression = appendToMemberExpression;
exports.prependToMemberExpression = prependToMemberExpression;
exports.ensureBlock = ensureBlock;
exports.clone = clone;
exports.cloneWithoutLoc = cloneWithoutLoc;
exports.cloneDeep = cloneDeep;
exports.matchesPattern = matchesPattern;
exports.buildMatchMemberExpression = buildMatchMemberExpression;
exports.addComment = addComment;
exports.addComments = addComments;
exports.removeComments = removeComments;
exports.inheritsComments = inheritsComments;
exports.inheritTrailingComments = inheritTrailingComments;
exports.inheritLeadingComments = inheritLeadingComments;
exports.inheritInnerComments = inheritInnerComments;
exports.inherits = inherits;
exports.assertNode = assertNode;
exports.isNode = isNode;
exports.traverseFast = traverseFast;
exports.removeProperties = removeProperties;
exports.removePropertiesDeep = removePropertiesDeep;
var _retrievers = require("./retrievers");
Object.defineProperty(exports, "VISITOR_KEYS", {
enumerable: true,
get: function get() {
return _definitions.VISITOR_KEYS;
}
});
Object.defineProperty(exports, "ALIAS_KEYS", {
enumerable: true,
get: function get() {
return _definitions.ALIAS_KEYS;
}
});
Object.defineProperty(exports, "NODE_FIELDS", {
enumerable: true,
get: function get() {
return _definitions.NODE_FIELDS;
}
});
Object.defineProperty(exports, "BUILDER_KEYS", {
enumerable: true,
get: function get() {
return _definitions.BUILDER_KEYS;
}
});
Object.defineProperty(exports, "DEPRECATED_KEYS", {
enumerable: true,
get: function get() {
return _definitions.DEPRECATED_KEYS;
}
});
Object.defineProperty(exports, "getBindingIdentifiers", {

@@ -165,5 +188,2 @@ enumerable: true,

});
var _validators = require("./validators");
Object.defineProperty(exports, "isBinding", {

@@ -229,5 +249,2 @@ enumerable: true,

});
var _converters = require("./converters");
Object.defineProperty(exports, "toComputedKey", {

@@ -287,5 +304,2 @@ enumerable: true,

});
var _flow = require("./flow");
Object.defineProperty(exports, "createUnionTypeAnnotation", {

@@ -309,15 +323,12 @@ enumerable: true,

});
exports.react = exports.TYPES = void 0;
var _toFastProperties = require("to-fast-properties");
var _toFastProperties = _interopRequireDefault(require("to-fast-properties"));
var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
var _clone = _interopRequireDefault(require("lodash/clone"));
var _clone = require("lodash/clone");
var _uniq = _interopRequireDefault(require("lodash/uniq"));
var _clone2 = _interopRequireDefault(_clone);
var _constants = require("./constants");
var _uniq = require("lodash/uniq");
var _uniq2 = _interopRequireDefault(_uniq);
require("./definitions/init");

@@ -327,6 +338,14 @@

var _react2 = require("./react");
var _react = _interopRequireWildcard(require("./react"));
var _react = _interopRequireWildcard(_react2);
exports.react = _react;
var _retrievers = require("./retrievers");
var _validators = require("./validators");
var _converters = require("./converters");
var _flow = require("./flow");
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -356,9 +375,2 @@

exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
exports.NODE_FIELDS = _definitions.NODE_FIELDS;
exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS;
exports.react = _react;
for (var type in t.VISITOR_KEYS) {

@@ -387,3 +399,4 @@ registerType(type);

});
var TYPES = exports.TYPES = Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS)).concat(Object.keys(t.DEPRECATED_KEYS));
var TYPES = Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS)).concat(Object.keys(t.DEPRECATED_KEYS));
exports.TYPES = TYPES;

@@ -447,3 +460,3 @@ function is(type, node, opts) {

var arg = arguments[i++];
if (arg === undefined) arg = (0, _clone2.default)(field.default);
if (arg === undefined) arg = (0, _clone.default)(field.default);
node[key] = arg;

@@ -531,5 +544,5 @@ }

for (var _key2 in node) {
if (_key2[0] === "_") continue;
newNode[_key2] = node[_key2];
for (var key in node) {
if (key[0] === "_") continue;
newNode[key] = node[key];
}

@@ -550,5 +563,5 @@

for (var _key3 in node) {
if (_key3[0] === "_") continue;
var val = node[_key3];
for (var key in node) {
if (key[0] === "_") continue;
var val = node[key];

@@ -563,3 +576,3 @@ if (val) {

newNode[_key3] = val;
newNode[key] = val;
}

@@ -574,3 +587,3 @@

var nodes = [];
var node = void 0;
var node;

@@ -647,4 +660,4 @@ for (node = member; t.isMemberExpression(node); node = node.object) {

var _key5 = _ref2;
node[_key5] = null;
var _key2 = _ref2;
node[_key2] = null;
}

@@ -676,3 +689,3 @@

if (child && parent) {
child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean));
child[key] = (0, _uniq.default)([].concat(child[key], parent[key]).filter(Boolean));
}

@@ -686,11 +699,11 @@ }

for (var _i5 = 0; _i5 < _arr3.length; _i5++) {
var _key6 = _arr3[_i5];
var key = _arr3[_i5];
if (child[_key6] == null) {
child[_key6] = parent[_key6];
if (child[key] == null) {
child[key] = parent[key];
}
}
for (var _key7 in parent) {
if (_key7[0] === "_" && _key7 !== "__clone") child[_key7] = parent[_key7];
for (var _key3 in parent) {
if (_key3[0] === "_" && _key3 !== "__clone") child[_key3] = parent[_key3];
}

@@ -701,4 +714,4 @@

for (var _i6 = 0; _i6 < _arr4.length; _i6++) {
var _key8 = _arr4[_i6];
child[_key8] = parent[_key8];
var _key4 = _arr4[_i6];
child[_key4] = parent[_key4];
}

@@ -720,4 +733,4 @@

(0, _toFastProperties2.default)(t);
(0, _toFastProperties2.default)(t.VISITOR_KEYS);
(0, _toFastProperties.default)(t);
(0, _toFastProperties.default)(t.VISITOR_KEYS);

@@ -743,4 +756,4 @@ function traverseFast(node, enter, opts) {

var _key10 = _ref3;
var subNode = node[_key10];
var _key5 = _ref3;
var subNode = node[_key5];

@@ -788,8 +801,8 @@ if (Array.isArray(subNode)) {

var _key13 = _ref5;
if (node[_key13] != null) node[_key13] = undefined;
var _key7 = _ref5;
if (node[_key7] != null) node[_key7] = undefined;
}
for (var _key12 in node) {
if (_key12[0] === "_" && node[_key12] != null) node[_key12] = undefined;
for (var _key6 in node) {
if (_key6[0] === "_" && node[_key6] != null) node[_key6] = undefined;
}

@@ -796,0 +809,0 @@

"use strict";
exports.__esModule = true;
exports.isReactComponent = undefined;
exports.isCompatTag = isCompatTag;
exports.buildChildren = buildChildren;
exports.isReactComponent = void 0;
var _index = require("./index");
var t = _interopRequireWildcard(require("./index"));
var t = _interopRequireWildcard(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component");
var isReactComponent = t.buildMatchMemberExpression("React.Component");
exports.isReactComponent = isReactComponent;

@@ -16,0 +15,0 @@ function isCompatTag(tagName) {

@@ -7,6 +7,4 @@ "use strict";

var _index = require("./index");
var t = _interopRequireWildcard(require("./index"));
var t = _interopRequireWildcard(_index);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -13,0 +11,0 @@

"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.isBinding = isBinding;

@@ -20,10 +17,6 @@ exports.isReferenced = isReferenced;

var _esutils = require("esutils");
var _esutils = _interopRequireDefault(require("esutils"));
var _esutils2 = _interopRequireDefault(_esutils);
var t = _interopRequireWildcard(require("./index"));
var _index = require("./index");
var t = _interopRequireWildcard(_index);
var _constants = require("./constants");

@@ -35,2 +28,4 @@

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function isBinding(node, parent) {

@@ -151,3 +146,3 @@ var keys = _retrievers.getBindingIdentifiers.keys[parent.type];

function isValidIdentifier(name) {
if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
if (typeof name !== "string" || _esutils.default.keyword.isReservedWordES6(name, true)) {
return false;

@@ -157,3 +152,3 @@ } else if (name === "await") {

} else {
return _esutils2.default.keyword.isIdentifierNameES6(name);
return _esutils.default.keyword.isIdentifierNameES6(name);
}

@@ -160,0 +155,0 @@ }

{
"name": "babel-types",
"version": "7.0.0-beta.2",
"version": "7.0.0-beta.3",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",

@@ -16,5 +16,5 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"devDependencies": {
"babel-generator": "7.0.0-beta.2",
"babylon": "^7.0.0-beta.25"
"babel-generator": "7.0.0-beta.3",
"babylon": "^7.0.0-beta.27"
}
}

@@ -2679,3 +2679,3 @@ # babel-types

- `operator`: `'void' | 'delete' | '!' | '+' | '-' | '~' | 'typeof'` (required)
- `operator`: `'void' | 'throw' | 'delete' | '!' | '+' | '-' | '~' | 'typeof'` (required)
- `argument`: `Expression` (required)

@@ -2682,0 +2682,0 @@ - `prefix`: `boolean` (default: `true`)

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