chore: enable flowcheck on CI (#11945)

* chore: enable flowcheck on CI

* fix: flow errors
This commit is contained in:
Huáng Jùnliàng
2020-08-10 16:57:29 -04:00
committed by GitHub
parent 00b974298b
commit a3893129ec
5 changed files with 6 additions and 7 deletions

View File

@@ -45,7 +45,6 @@ export default (superClass: Class<Parser>): Class<Parser> =>
estreeParseDecimalLiteral(value: any): N.Node {
// https://github.com/estree/estree/blob/master/experimental/decimal.md
// $FlowIgnore
// todo: use BigDecimal when node supports it.
const decimal = null;
const node = this.estreeParseLiteral(decimal);

View File

@@ -203,6 +203,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
this.next();
this.takeDecorators(node);
const oldStrict = this.state.strict;
const placeholder = this.parsePlaceholder("Identifier");
if (placeholder) {
@@ -226,7 +227,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
this.parseClassSuper(node);
node.body =
this.parsePlaceholder("ClassBody") ||
this.parseClassBody(!!node.superClass);
this.parseClassBody(!!node.superClass, oldStrict);
return this.finishNode(node, type);
}

View File

@@ -2727,7 +2727,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return hasContextParam ? baseCount + 1 : baseCount;
}
parseCatchClauseParam(): N.Identifier {
parseCatchClauseParam(): N.Pattern {
const param = super.parseCatchClauseParam();
const type = this.tsTryParseTypeAnnotation();