@putout/printer
Advanced tools
Comparing version 11.0.0 to 11.1.0
'use strict'; | ||
const { | ||
concatanate, | ||
concatenate, | ||
isConcatenation, | ||
} = require('./concatanate'); | ||
} = require('./concatenate'); | ||
@@ -41,3 +41,3 @@ const {maybeSpace} = require('./maybe-space'); | ||
if (isConcatenation(path)) | ||
return concatanate(path, { | ||
return concatenate(path, { | ||
print, | ||
@@ -44,0 +44,0 @@ indent, |
@@ -39,2 +39,3 @@ 'use strict'; | ||
maxVariablesInOneLine: 4, | ||
maxTypesInOneLine: 3, | ||
trailingComma: true, | ||
@@ -41,0 +42,0 @@ encodeSingleQuote: true, |
@@ -32,8 +32,4 @@ 'use strict'; | ||
const {TSMethodSignature} = require('./function/ts-method-signature'); | ||
const {TSUnionType} = require('./ts-union-type/ts-union-type'); | ||
const { | ||
maybeParenOpen, | ||
maybeParenClose, | ||
} = require('../expressions/unary-expression/parens'); | ||
const {maybePrintTypeAnnotation} = require('../maybe/maybe-type-annotation'); | ||
@@ -59,2 +55,3 @@ const {TSImportType} = require('./ts-import-type'); | ||
TSImportType, | ||
TSUnionType, | ||
TSBigIntKeyword(path, {write}) { | ||
@@ -132,22 +129,2 @@ write('bigint'); | ||
}, | ||
TSUnionType(path, printer) { | ||
const {traverse, write} = printer; | ||
const types = path.get('types'); | ||
const n = types.length - 1; | ||
maybeParenOpen(path, printer); | ||
for (const [i, type] of types.entries()) { | ||
traverse(type); | ||
if (i < n) { | ||
write.space(); | ||
write('|'); | ||
write.space(); | ||
} | ||
} | ||
maybeParenClose(path, printer); | ||
}, | ||
TSNumberKeyword(path, {write}) { | ||
@@ -154,0 +131,0 @@ write('number'); |
{ | ||
"name": "@putout/printer", | ||
"version": "11.0.0", | ||
"version": "11.1.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
@@ -100,2 +100,3 @@ # Printer [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL] | ||
maxVariablesInOneLine: 4, | ||
maxTypesInOneLine: 3, | ||
maxPropertiesInOneLine: 2, | ||
@@ -102,0 +103,0 @@ maxPropertiesLengthInOneLine: 15, |
Sorry, the diff of this file is not supported yet
238704
142
5228
341