diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b08f75b0f5b..55d267cb53a 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2615,6 +2615,7 @@ namespace ts { } function parseUnionOrIntersectionType(kind: SyntaxKind, parseConstituentType: () => TypeNode, operator: SyntaxKind): TypeNode { + parseOptional(operator); let type = parseConstituentType(); if (token() === operator) { const types = createNodeArray([type], type.pos);