Skip to content

Commit 07d8883

Browse files
committed
Try another solution
1 parent b1d96cd commit 07d8883

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/language-js/print/type-parameters.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ function printTypeParameters(path, options, print, paramsKey) {
3939
!(node[paramsKey].length === 1 && isObjectType(node[paramsKey][0])),
4040
undefined,
4141
(node, name) => name === "typeAnnotation",
42-
(node) => node.type === "Identifier",
42+
(node, name) => node.type === "Identifier" && name === "id",
4343
isArrowFunctionVariableDeclarator
4444
);
4545

4646
const shouldInline =
47-
node[paramsKey].length === 0 ||
48-
(!isArrowFunctionVariable &&
49-
(isParameterInTestCall ||
50-
(node[paramsKey].length === 1 &&
51-
(node[paramsKey][0].type === "NullableTypeAnnotation" ||
52-
shouldHugType(node[paramsKey][0])))));
47+
!isArrowFunctionVariable &&
48+
(isParameterInTestCall ||
49+
node[paramsKey].length === 0 ||
50+
(node[paramsKey].length === 1 &&
51+
(node[paramsKey][0].type === "NullableTypeAnnotation" ||
52+
shouldHugType(node[paramsKey][0]))));
5353

5454
if (shouldInline) {
5555
return [

0 commit comments

Comments
 (0)