@babel/types
Advanced tools
Comparing version 7.1.2 to 7.1.3
@@ -192,2 +192,4 @@ "use strict"; | ||
exports.assertTSTupleType = assertTSTupleType; | ||
exports.assertTSOptionalType = assertTSOptionalType; | ||
exports.assertTSRestType = assertTSRestType; | ||
exports.assertTSUnionType = assertTSUnionType; | ||
@@ -1022,2 +1024,10 @@ exports.assertTSIntersectionType = assertTSIntersectionType; | ||
function assertTSOptionalType(node, opts = {}) { | ||
assert("TSOptionalType", node, opts); | ||
} | ||
function assertTSRestType(node, opts = {}) { | ||
assert("TSRestType", node, opts); | ||
} | ||
function assertTSUnionType(node, opts = {}) { | ||
@@ -1024,0 +1034,0 @@ assert("TSUnionType", node, opts); |
@@ -192,2 +192,4 @@ "use strict"; | ||
exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; | ||
exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; | ||
exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; | ||
exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; | ||
@@ -974,2 +976,10 @@ exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; | ||
function TSOptionalType(...args) { | ||
return (0, _builder.default)("TSOptionalType", ...args); | ||
} | ||
function TSRestType(...args) { | ||
return (0, _builder.default)("TSRestType", ...args); | ||
} | ||
function TSUnionType(...args) { | ||
@@ -976,0 +986,0 @@ return (0, _builder.default)("TSUnionType", ...args); |
@@ -54,3 +54,3 @@ "use strict"; | ||
expression: { | ||
validate: (0, _utils.assertNodeType)("Expression") | ||
validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") | ||
} | ||
@@ -57,0 +57,0 @@ } |
@@ -162,2 +162,16 @@ "use strict"; | ||
}); | ||
(0, _utils.default)("TSOptionalType", { | ||
aliases: ["TSType"], | ||
visitor: ["typeAnnotation"], | ||
fields: { | ||
typeAnnotation: (0, _utils.validateType)("TSType") | ||
} | ||
}); | ||
(0, _utils.default)("TSRestType", { | ||
aliases: ["TSType"], | ||
visitor: ["typeAnnotation"], | ||
fields: { | ||
typeAnnotation: (0, _utils.validateType)("TSType") | ||
} | ||
}); | ||
const unionOrIntersection = { | ||
@@ -164,0 +178,0 @@ aliases: ["TSType"], |
{ | ||
"name": "@babel/types", | ||
"version": "7.1.2", | ||
"version": "7.1.3", | ||
"description": "Babel Types is a Lodash-esque utility library for AST nodes", | ||
@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", |
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
564156
11740