@babel/generator
Advanced tools
Comparing version 7.16.8 to 7.17.0
@@ -6,2 +6,3 @@ "use strict"; | ||
}); | ||
exports.ClassAccessorProperty = ClassAccessorProperty; | ||
exports.ClassBody = ClassBody; | ||
@@ -118,2 +119,40 @@ exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; | ||
function ClassAccessorProperty(node) { | ||
this.printJoin(node.decorators, node); | ||
this.source("end", node.key.loc); | ||
this.tsPrintClassMemberModifiers(node, true); | ||
this.word("accessor"); | ||
this.printInnerComments(node); | ||
this.space(); | ||
if (node.computed) { | ||
this.token("["); | ||
this.print(node.key, node); | ||
this.token("]"); | ||
} else { | ||
this._variance(node); | ||
this.print(node.key, node); | ||
} | ||
if (node.optional) { | ||
this.token("?"); | ||
} | ||
if (node.definite) { | ||
this.token("!"); | ||
} | ||
this.print(node.typeAnnotation, node); | ||
if (node.value) { | ||
this.space(); | ||
this.token("="); | ||
this.space(); | ||
this.print(node.value, node); | ||
} | ||
this.semicolon(); | ||
} | ||
function ClassPrivateProperty(node) { | ||
@@ -120,0 +159,0 @@ this.printJoin(node.decorators, node); |
@@ -250,3 +250,3 @@ "use strict"; | ||
const validTopicTokenSet = new Set(["^", "%", "#"]); | ||
const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]); | ||
@@ -253,0 +253,0 @@ function TopicReference() { |
{ | ||
"name": "@babel/generator", | ||
"version": "7.16.8", | ||
"version": "7.17.0", | ||
"description": "Turns an AST into code.", | ||
@@ -22,3 +22,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/types": "^7.16.8", | ||
"@babel/types": "^7.17.0", | ||
"jsesc": "^2.5.1", | ||
@@ -28,4 +28,4 @@ "source-map": "^0.5.0" | ||
"devDependencies": { | ||
"@babel/helper-fixtures": "^7.16.8", | ||
"@babel/parser": "^7.16.8", | ||
"@babel/helper-fixtures": "^7.17.0", | ||
"@babel/parser": "^7.17.0", | ||
"@types/jsesc": "^2.5.0", | ||
@@ -32,0 +32,0 @@ "@types/source-map": "^0.5.0", |
119212
4250
Updated@babel/types@^7.17.0