ts-blank-space
Advanced tools
Comparing version 0.4.4 to 0.5.0
@@ -319,10 +319,2 @@ // Copyright 2024 Bloomberg Finance L.P. | ||
function isAsync(modifiers ) { | ||
if (!modifiers) return false; | ||
for (let i = 0; i < modifiers.length; i++) { | ||
if (modifiers[i].kind === SK.AsyncKeyword) return true; | ||
} | ||
return false; | ||
} | ||
/** | ||
@@ -413,4 +405,5 @@ * prop: T | ||
let moveOpenParen = false; | ||
const params = node.parameters; | ||
if (node.typeParameters && node.typeParameters.length) { | ||
moveOpenParen = isAsync(node.modifiers) && spansLines(node.typeParameters.pos, node.typeParameters.end); | ||
moveOpenParen = spansLines(node.typeParameters.pos, params.pos); | ||
blankGenerics(node, node.typeParameters, moveOpenParen); | ||
@@ -422,3 +415,2 @@ } | ||
const params = node.parameters; | ||
if (moveOpenParen) { | ||
@@ -425,0 +417,0 @@ str.blank(params.pos - 1, params.pos); |
{ | ||
"name": "ts-blank-space", | ||
"description": "A small, fast, pure JavaScript type-stripper that uses the official TypeScript parser.", | ||
"version": "0.4.4", | ||
"version": "0.5.0", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "homepage": "https://bloomberg.github.io/ts-blank-space", |
47238
685