Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
Fix new type errors (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy authored and existentialism committed Oct 10, 2017
1 parent 6fc9af5 commit 0fbf3a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/parser/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ export default class ExpressionParser extends LValParser {
refShorthandDefaultPos?: ?Pos,
): T {
let decorators = [];
const propHash = Object.create(null);
const propHash: any = Object.create(null);
let first = true;
const node = this.startNode();

Expand Down Expand Up @@ -1567,7 +1567,7 @@ export default class ExpressionParser extends LValParser {
}

if (checkLVal) {
const nameHash = Object.create(null);
const nameHash: any = Object.create(null);
const oldStrict = this.state.strict;
if (isStrict) this.state.strict = true;
if (node.id) {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/location.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import { getLineInfo } from "../util/location";
import { getLineInfo, type Position } from "../util/location";
import CommentsParser from "./comments";

// This function is used to raise exceptions on parse errors. It
Expand Down
3 changes: 2 additions & 1 deletion src/parser/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ export default class StatementParser extends ExpressionParser {
if (this.match(tt.parenL)) {
this.expect(tt.parenL);
clause.param = this.parseBindingAtom();
this.checkLVal(clause.param, true, Object.create(null), "catch clause");
const clashes: any = Object.create(null);
this.checkLVal(clause.param, true, clashes, "catch clause");
this.expect(tt.parenR);
} else {
this.expectPlugin("optionalCatchBinding");
Expand Down

0 comments on commit 0fbf3a6

Please sign in to comment.