From cebc85bbbeb8c584bb6a54c8aefe1c5369da7e5d Mon Sep 17 00:00:00 2001 From: Federico Ciardi Date: Tue, 2 Feb 2021 20:45:02 +0100 Subject: [PATCH] fix: type casting --- packages/babel-traverse/src/path/introspection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-traverse/src/path/introspection.ts b/packages/babel-traverse/src/path/introspection.ts index a3aa04131bfb..dc1a82333b37 100644 --- a/packages/babel-traverse/src/path/introspection.ts +++ b/packages/babel-traverse/src/path/introspection.ts @@ -401,7 +401,7 @@ export function _guessExecutionStatusRelativeToDifferentFunctions( // a. not called at all (part of an export) // b. called directly const bindingName = targetIsGenericFunctionExpression - ? (target.parent as t.VariableDeclarator).id.name + ? ((target.parent as t.VariableDeclarator).id as t.Identifier).name : (target.node as t.FunctionDeclaration).id.name; const binding = target.scope.getBinding(bindingName);