Remove outdated typeArguments check (#18640)
This commit is contained in:
1 parent
8bb1341ff4
commit
28c00b6251
1 file changed
+2
-9
@@ -419,7 +419,7 @@ function isObjectPropertyWithShortKey(node, keyDoc, options) {
|
||||
}
|
||||
|
||||
function isCallExpressionWithComplexTypeArguments(node, print) {
|
||||
const typeArgs = getTypeArgumentsFromCallExpression(node);
|
||||
const typeArgs = node.typeArguments?.params;
|
||||
if (isNonEmptyArray(typeArgs)) {
|
||||
if (typeArgs.length > 1) {
|
||||
return true;
|
||||
@@ -435,20 +435,13 @@ function isCallExpressionWithComplexTypeArguments(node, print) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const typeArgsKeyName = node.typeParameters
|
||||
? "typeParameters"
|
||||
: "typeArguments";
|
||||
if (willBreak(print(typeArgsKeyName))) {
|
||||
if (willBreak(print("typeArguments"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTypeArgumentsFromCallExpression(node) {
|
||||
return (node.typeParameters ?? node.typeArguments)?.params;
|
||||
}
|
||||
|
||||
function isGeneric(node) {
|
||||
switch (node.type) {
|
||||
case "FunctionTypeAnnotation":
|
||||
|
||||
Reference in new issue
Block a user