* Fix #321 by allowing question marks in type params * Require commas between params
This commit is contained in:
@@ -569,7 +569,7 @@ pp.reinterpretTypeAsFunctionTypeParam = function (type) {
|
||||
|
||||
pp.flowParseFunctionTypeParams = function (params = []) {
|
||||
const ret = { params, rest: null };
|
||||
while (this.match(tt.name)) {
|
||||
while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
|
||||
ret.params.push(this.flowParseFunctionTypeParam());
|
||||
if (!this.match(tt.parenR)) {
|
||||
this.expect(tt.comma);
|
||||
|
||||
Reference in New Issue
Block a user