@putout/printer
Advanced tools
Comparing version 1.40.2 to 1.41.0
'use strict'; | ||
const {hasPrevNewline} = require('../mark'); | ||
const {exists} = require('../is'); | ||
const isFirst = (path) => !path.getPrevSibling().node; | ||
@@ -43,3 +44,3 @@ | ||
function ArrowFunctionExpression(path, {print, maybe}) { | ||
function ArrowFunctionExpression(path, {print, maybe, write, traverse}) { | ||
const {async} = path.node; | ||
@@ -59,3 +60,14 @@ maybe.print(async, 'async '); | ||
print(') => '); | ||
print(')'); | ||
const returnType = path.get('returnType'); | ||
if (exists(returnType)) { | ||
write(':'); | ||
write.space(); | ||
traverse(returnType); | ||
} | ||
print.space(); | ||
print('=>'); | ||
print.space(); | ||
print('__body'); | ||
@@ -133,1 +145,2 @@ } | ||
}; | ||
@@ -30,3 +30,8 @@ 'use strict'; | ||
print('__typeName'); | ||
print('__typeParameters'); | ||
}, | ||
TSArrayType(path, {print}) { | ||
print('__elementType'); | ||
print('[]'); | ||
}, | ||
TSTypeParameter(path, {write}) { | ||
@@ -33,0 +38,0 @@ write(path.node.name); |
{ | ||
"name": "@putout/printer", | ||
"version": "1.40.2", | ||
"version": "1.41.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
79114
2177