@babel/generator
Advanced tools
Comparing version 7.17.12 to 7.18.0
@@ -28,2 +28,3 @@ "use strict"; | ||
exports.TSInferType = TSInferType; | ||
exports.TSInstantiationExpression = TSInstantiationExpression; | ||
exports.TSInterfaceBody = TSInterfaceBody; | ||
@@ -96,2 +97,12 @@ exports.TSInterfaceDeclaration = TSInterfaceDeclaration; | ||
function TSTypeParameter(node) { | ||
if (node.in) { | ||
this.word("in"); | ||
this.space(); | ||
} | ||
if (node.out) { | ||
this.word("out"); | ||
this.space(); | ||
} | ||
this.word(node.name); | ||
@@ -357,2 +368,6 @@ | ||
this.print(node.exprName); | ||
if (node.typeParameters) { | ||
this.print(node.typeParameters, node); | ||
} | ||
} | ||
@@ -617,2 +632,7 @@ | ||
function TSInstantiationExpression(node) { | ||
this.print(node.expression, node); | ||
this.print(node.typeParameters, node); | ||
} | ||
function TSEnumDeclaration(node) { | ||
@@ -619,0 +639,0 @@ const { |
@@ -24,2 +24,3 @@ "use strict"; | ||
exports.TSInferType = TSInferType; | ||
exports.TSInstantiationExpression = TSInstantiationExpression; | ||
exports.TSTypeAssertion = TSTypeAssertion; | ||
@@ -70,2 +71,3 @@ exports.TSIntersectionType = exports.TSUnionType = TSUnionType; | ||
isTSAsExpression, | ||
isTSInstantiationExpression, | ||
isTSIntersectionType, | ||
@@ -196,2 +198,6 @@ isTSNonNullExpression, | ||
function TSInstantiationExpression(node, parent) { | ||
return (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters; | ||
} | ||
function BinaryExpression(node, parent) { | ||
@@ -198,0 +204,0 @@ return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent)); |
{ | ||
"name": "@babel/generator", | ||
"version": "7.17.12", | ||
"version": "7.18.0", | ||
"description": "Turns an AST into code.", | ||
@@ -22,3 +22,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/types": "^7.17.12", | ||
"@babel/types": "^7.18.0", | ||
"@jridgewell/gen-mapping": "^0.3.0", | ||
@@ -29,3 +29,3 @@ "jsesc": "^2.5.1" | ||
"@babel/helper-fixtures": "^7.17.10", | ||
"@babel/parser": "^7.17.12", | ||
"@babel/parser": "^7.18.0", | ||
"@jridgewell/trace-mapping": "^0.3.8", | ||
@@ -32,0 +32,0 @@ "@types/jsesc": "^2.5.0", |
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
120303
4288
1
Updated@babel/types@^7.18.0