From 443abe53730aeaefd2b1f1777dac51cc32f418b3 Mon Sep 17 00:00:00 2001 From: Marius Schulz Date: Sat, 19 Nov 2016 22:30:18 +0100 Subject: [PATCH] =?UTF-8?q?Allow=20one=20leading=20ignored=20=E2=80=9C|?= =?UTF-8?q?=E2=80=9D=20or=20=E2=80=9C&=E2=80=9D=20in=20a=20type=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler/parser.ts | 1 + 1 file changed, 1 insertion(+) 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);