@babel/generator
Advanced tools
Comparing version 7.16.7 to 7.16.8
@@ -66,3 +66,3 @@ "use strict"; | ||
if (raw != null) { | ||
if (!this.format.minified && raw != null) { | ||
this.token(raw); | ||
@@ -69,0 +69,0 @@ return; |
@@ -83,5 +83,10 @@ "use strict"; | ||
function TSTypeParameterInstantiation(node) { | ||
function TSTypeParameterInstantiation(node, parent) { | ||
this.token("<"); | ||
this.printList(node.params, node, {}); | ||
if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) { | ||
this.token(","); | ||
} | ||
this.token(">"); | ||
@@ -310,5 +315,5 @@ } | ||
const { | ||
typeParameters, | ||
parameters | ||
typeParameters | ||
} = node; | ||
const parameters = node.parameters; | ||
this.print(typeParameters, node); | ||
@@ -323,3 +328,4 @@ this.token("("); | ||
this.space(); | ||
this.print(node.typeAnnotation.typeAnnotation, node); | ||
const returnType = node.typeAnnotation; | ||
this.print(returnType.typeAnnotation, node); | ||
} | ||
@@ -767,5 +773,5 @@ | ||
const { | ||
typeParameters, | ||
parameters | ||
typeParameters | ||
} = node; | ||
const parameters = node.parameters; | ||
this.print(typeParameters, node); | ||
@@ -777,3 +783,4 @@ this.token("("); | ||
this.token(")"); | ||
this.print(node.typeAnnotation, node); | ||
const returnType = node.typeAnnotation; | ||
this.print(returnType, node); | ||
} | ||
@@ -780,0 +787,0 @@ |
{ | ||
"name": "@babel/generator", | ||
"version": "7.16.7", | ||
"version": "7.16.8", | ||
"description": "Turns an AST into code.", | ||
@@ -22,3 +22,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/types": "^7.16.7", | ||
"@babel/types": "^7.16.8", | ||
"jsesc": "^2.5.1", | ||
@@ -28,4 +28,4 @@ "source-map": "^0.5.0" | ||
"devDependencies": { | ||
"@babel/helper-fixtures": "^7.16.7", | ||
"@babel/parser": "^7.16.7", | ||
"@babel/helper-fixtures": "^7.16.8", | ||
"@babel/parser": "^7.16.8", | ||
"@types/jsesc": "^2.5.0", | ||
@@ -32,0 +32,0 @@ "@types/source-map": "^0.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
118455
4219
Updated@babel/types@^7.16.8