@putout/printer
Advanced tools
Comparing version 1.13.1 to 1.14.0
'use strict'; | ||
const {entries} = Object; | ||
const isForOf = ({parentPath}) => parentPath.parentPath.parentPath.isForOfStatement(); | ||
@@ -18,3 +17,3 @@ | ||
for (const [index, element] of entries(elements)) { | ||
for (const [index, element] of elements.entries()) { | ||
maybe.indent(isNewLine); | ||
@@ -21,0 +20,0 @@ print(element); |
@@ -8,4 +8,2 @@ 'use strict'; | ||
const {entries} = Object; | ||
const CallExpression = { | ||
@@ -32,3 +30,3 @@ beforeIf(path) { | ||
for (const [i, arg] of entries(args)) { | ||
for (const [i, arg] of args.entries()) { | ||
if (isParentCall) { | ||
@@ -35,0 +33,0 @@ print.newline(); |
'use strict'; | ||
const {entries} = Object; | ||
module.exports.ClassDeclaration = (path, {maybe, print, indent}) => { | ||
@@ -24,3 +22,3 @@ indent(); | ||
for (const [i, item] of entries(body)) { | ||
for (const [i, item] of body.entries()) { | ||
indent(); | ||
@@ -27,0 +25,0 @@ print(item); |
'use strict'; | ||
const {entries} = Object; | ||
module.exports.SequenceExpression = (path, {maybe, print}) => { | ||
@@ -9,3 +7,3 @@ const expressions = path.get('expressions'); | ||
for (const [index, expression] of entries(expressions)) { | ||
for (const [index, expression] of expressions.entries()) { | ||
print(expression); | ||
@@ -12,0 +10,0 @@ maybe.print(index < n, ','); |
@@ -26,4 +26,5 @@ 'use strict'; | ||
}, | ||
Identifier(path, {write}) { | ||
Identifier(path, {write, print}) { | ||
write(path.node.name); | ||
print('__typeAnnotation'); | ||
}, | ||
@@ -30,0 +31,0 @@ RegExpLiteral(path, {print}) { |
'use strict'; | ||
const {entries} = Object; | ||
module.exports.SwitchStatement = (path, {print, maybe}) => { | ||
@@ -16,3 +14,3 @@ print('switch'); | ||
for (const [index, switchCase] of entries(cases)) { | ||
for (const [index, switchCase] of cases.entries()) { | ||
print('case'); | ||
@@ -19,0 +17,0 @@ print.space(); |
@@ -17,5 +17,13 @@ 'use strict'; | ||
}, | ||
TSTypeParameter(path, {print}) { | ||
print(path.node.name); | ||
TSTypeParameter(path, {write}) { | ||
write(path.node.name); | ||
}, | ||
TSNumberKeyword(path, {write}) { | ||
write('number'); | ||
}, | ||
TSTypeAnnotation(path, {print}) { | ||
print(':'); | ||
print.space(); | ||
print('__typeAnnotation'); | ||
}, | ||
TSExpressionWithTypeArguments(path, {print}) { | ||
@@ -22,0 +30,0 @@ print('__expression'); |
{ | ||
"name": "@putout/printer", | ||
"version": "1.13.1", | ||
"version": "1.14.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
Sorry, the diff of this file is not supported yet
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
56644
1627