@babel/types
Advanced tools
Comparing version 7.0.0-beta.40 to 7.0.0-beta.41
@@ -185,2 +185,4 @@ "use strict"; | ||
exports.assertTSIntersectionType = assertTSIntersectionType; | ||
exports.assertTSConditionalType = assertTSConditionalType; | ||
exports.assertTSInferType = assertTSInferType; | ||
exports.assertTSParenthesizedType = assertTSParenthesizedType; | ||
@@ -1714,2 +1716,18 @@ exports.assertTSTypeOperator = assertTSTypeOperator; | ||
function assertTSConditionalType(node, opts) { | ||
if (opts === void 0) { | ||
opts = {}; | ||
} | ||
assert("TSConditionalType", node, opts); | ||
} | ||
function assertTSInferType(node, opts) { | ||
if (opts === void 0) { | ||
opts = {}; | ||
} | ||
assert("TSInferType", node, opts); | ||
} | ||
function assertTSParenthesizedType(node, opts) { | ||
@@ -1716,0 +1734,0 @@ if (opts === void 0) { |
@@ -664,2 +664,6 @@ "use strict"; | ||
}, | ||
definite: { | ||
optional: true, | ||
validate: (0, _utils.assertValueType)("boolean") | ||
}, | ||
init: { | ||
@@ -666,0 +670,0 @@ optional: true, |
@@ -33,2 +33,6 @@ "use strict"; | ||
}, | ||
definite: { | ||
validate: (0, _utils.assertValueType)("boolean"), | ||
optional: true | ||
}, | ||
typeAnnotation: { | ||
@@ -35,0 +39,0 @@ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), |
@@ -218,2 +218,3 @@ "use strict"; | ||
aliases: ["Flow", "FlowType"], | ||
builder: ["properties", "indexers", "callProperties", "exact"], | ||
fields: { | ||
@@ -223,3 +224,6 @@ properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), | ||
callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), | ||
exact: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) | ||
exact: { | ||
validate: (0, _utils.assertValueType)("boolean"), | ||
default: false | ||
} | ||
} | ||
@@ -226,0 +230,0 @@ }); |
@@ -172,2 +172,19 @@ "use strict"; | ||
(0, _utils.default)("TSIntersectionType", unionOrIntersection); | ||
(0, _utils.default)("TSConditionalType", { | ||
aliases: ["TSType"], | ||
visitor: ["checkType", "extendsType", "trueType", "falseType"], | ||
fields: { | ||
checkType: (0, _utils.validateType)("TSType"), | ||
extendsType: (0, _utils.validateType)("TSType"), | ||
trueType: (0, _utils.validateType)("TSType"), | ||
falseType: (0, _utils.validateType)("TSType") | ||
} | ||
}); | ||
(0, _utils.default)("TSInferType", { | ||
aliases: ["TSType"], | ||
visitor: ["typeParameter"], | ||
fields: { | ||
typeParameter: (0, _utils.validateType)("TSType") | ||
} | ||
}); | ||
(0, _utils.default)("TSParenthesizedType", { | ||
@@ -174,0 +191,0 @@ aliases: ["TSType"], |
@@ -83,2 +83,5 @@ "use strict"; | ||
FunctionExpression: ["id", "params"], | ||
ArrowFunctionExpression: ["params"], | ||
ObjectMethod: ["params"], | ||
ClassMethod: ["params"], | ||
ForInStatement: ["left"], | ||
@@ -85,0 +88,0 @@ ForOfStatement: ["left"], |
@@ -185,2 +185,4 @@ "use strict"; | ||
exports.isTSIntersectionType = isTSIntersectionType; | ||
exports.isTSConditionalType = isTSConditionalType; | ||
exports.isTSInferType = isTSInferType; | ||
exports.isTSParenthesizedType = isTSParenthesizedType; | ||
@@ -984,2 +986,10 @@ exports.isTSTypeOperator = isTSTypeOperator; | ||
function isTSConditionalType(node, opts) { | ||
return (0, _is.default)("TSConditionalType", node, opts); | ||
} | ||
function isTSInferType(node, opts) { | ||
return (0, _is.default)("TSInferType", node, opts); | ||
} | ||
function isTSParenthesizedType(node, opts) { | ||
@@ -986,0 +996,0 @@ return (0, _is.default)("TSParenthesizedType", node, opts); |
{ | ||
"name": "@babel/types", | ||
"version": "7.0.0-beta.40", | ||
"version": "7.0.0-beta.41", | ||
"description": "Babel Types is a Lodash-esque utility library for AST nodes", | ||
@@ -17,5 +17,5 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"devDependencies": { | ||
"@babel/generator": "7.0.0-beta.40", | ||
"babylon": "7.0.0-beta.40" | ||
"@babel/generator": "7.0.0-beta.41", | ||
"babylon": "7.0.0-beta.41" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
585979
10028
2925