diff --git a/src/acorn/plugins/flow.js b/src/acorn/plugins/flow.js index fad5277665..189395b6fa 100644 --- a/src/acorn/plugins/flow.js +++ b/src/acorn/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")