Skip to content

Commit 443abe5

Browse files
committed
Allow one leading ignored “|” or “&” in a type position
1 parent f2a7434 commit 443abe5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,6 +2615,7 @@ namespace ts {
26152615
}
26162616

26172617
function parseUnionOrIntersectionType(kind: SyntaxKind, parseConstituentType: () => TypeNode, operator: SyntaxKind): TypeNode {
2618+
parseOptional(operator);
26182619
let type = parseConstituentType();
26192620
if (token() === operator) {
26202621
const types = createNodeArray<TypeNode>([type], type.pos);

0 commit comments

Comments
 (0)