From b060edcc18c394e59c38475f1a4ccdb01377b95e Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 30 Jan 2022 19:42:31 -0800 Subject: [PATCH] Fix flow errors. Reviewed by @tolmasky. --- packages/babel-parser/src/plugins/estree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/babel-parser/src/plugins/estree.js b/packages/babel-parser/src/plugins/estree.js index e7b69dfff840..4e154256f0b1 100644 --- a/packages/babel-parser/src/plugins/estree.js +++ b/packages/babel-parser/src/plugins/estree.js @@ -4,6 +4,7 @@ import { type TokenType } from "../tokenizer/types"; import type Parser from "../parser"; import type { ExpressionErrors } from "../parser/util"; import * as N from "../types"; +import type { Node as NodeType, NodeBase, File } from "../types"; import type { Position } from "../util/location"; import { Errors } from "../parser/error"; @@ -11,7 +12,7 @@ const { defineProperty } = Object; const toUnenumerable = (object, key) => defineProperty(object, key, { enumerable: false, value: object[key] }); -function toESTreeLocation(node) { +function toESTreeLocation(node: any) { toUnenumerable(node.loc.start, "index"); toUnenumerable(node.loc.end, "index");