Upgrade flow to 0.66 and fix a few minor errors. (#7431)
This commit is contained in:
@@ -1678,7 +1678,9 @@ export default class ExpressionParser extends LValParser {
|
||||
const oldStrict = this.state.strict;
|
||||
if (isStrict) this.state.strict = isStrict;
|
||||
if (node.id) {
|
||||
this.checkReservedWord(node.id, node.start, true, true);
|
||||
// TODO(logan): This check is broken because it passes a node object as
|
||||
// a binding name. Passing the actual string introduces other failures.
|
||||
// this.checkReservedWord(node.id, node.start, true, true);
|
||||
}
|
||||
if (checkLVal) {
|
||||
const nameHash: any = Object.create(null);
|
||||
|
||||
@@ -1488,7 +1488,10 @@ export default class StatementParser extends ExpressionParser {
|
||||
node.declaration.type === "FunctionDeclaration" ||
|
||||
node.declaration.type === "ClassDeclaration"
|
||||
) {
|
||||
this.checkDuplicateExports(node, node.declaration.id.name);
|
||||
const id = node.declaration.id;
|
||||
if (!id) throw new Error("Assertion failure");
|
||||
|
||||
this.checkDuplicateExports(node, id.name);
|
||||
} else if (node.declaration.type === "VariableDeclaration") {
|
||||
for (const declaration of node.declaration.declarations) {
|
||||
this.checkDeclaration(declaration.id);
|
||||
|
||||
@@ -1068,6 +1068,8 @@ export type TsType =
|
||||
| TsArrayType
|
||||
| TsTupleType
|
||||
| TsUnionOrIntersectionType
|
||||
| TsConditionalType
|
||||
| TsInferType
|
||||
| TsParenthesizedType
|
||||
| TsTypeOperator
|
||||
| TsIndexedAccessType
|
||||
@@ -1163,10 +1165,10 @@ export type TsConditionalType = TsTypeBase & {
|
||||
checkType: TsType,
|
||||
extendsType: TsType,
|
||||
trueType: TsType,
|
||||
falseType: tsType,
|
||||
falseType: TsType,
|
||||
};
|
||||
|
||||
export type InferType = TsTypeBase & {
|
||||
export type TsInferType = TsTypeBase & {
|
||||
type: "TSInferType",
|
||||
typeParameter: TypeParameter,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user