Fix handling of anonymous parameters in flowParseObjectTypeMethodish. (#526)
By analogy with `flowParseFunctionTypeParams` (cf. commit 407c97c9c2).
This commit is contained in:
committed by
Daniel Tschinder
parent
4ef964e066
commit
b08fdf87e8
@@ -470,7 +470,7 @@ export default (superClass: Class<Parser>): Class<Parser> => class extends super
|
||||
}
|
||||
|
||||
this.expect(tt.parenL);
|
||||
while (this.match(tt.name)) {
|
||||
while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
|
||||
node.params.push(this.flowParseFunctionTypeParam());
|
||||
if (!this.match(tt.parenR)) {
|
||||
this.expect(tt.comma);
|
||||
|
||||
Reference in New Issue
Block a user