From 0ae194346612f4ce099500becd73fd5cce3224aa Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 11 May 2015 23:44:22 +0100 Subject: [PATCH] register as inside a type when parsing type aliases to avoid ambiguous jsx parsing - fixes #1378 --- plugins/flow.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/flow.js b/plugins/flow.js index fad5277665..189395b6fa 100644 --- a/plugins/flow.js +++ b/plugins/flow.js @@ -153,10 +153,15 @@ pp.flow_parseTypeAlias = function (node) { node.typeParameters = null } + var oldInType = this.inType; + this.inType = true; + this.expect(tt.eq) node.right = this.flow_parseType() + this.inType = oldInType; + this.semicolon() return this.finishNode(node, "TypeAlias")