Skip to content

Commit 9d01b1a

Browse files
committed
fix: add parens around intersection type in union (DNF types)
1 parent 81c72b9 commit 9d01b1a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/needs-parens.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ function needsParens(path, options) {
239239
default:
240240
return false;
241241
}
242+
case "intersectiontype":
243+
return parent.kind === "uniontype";
242244
case "print":
243245
case "include":
244246
return parent.kind === "bin";

0 commit comments

Comments
 (0)