From 584518d04c27c87cdcee00ce9642e908b767cd1c Mon Sep 17 00:00:00 2001 From: Bogdan Savluk Date: Wed, 6 Jan 2021 14:12:45 +0100 Subject: [PATCH] Improve types in `@babel/helper-function-name` (#12550) --- packages/babel-helper-function-name/src/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/babel-helper-function-name/src/index.ts b/packages/babel-helper-function-name/src/index.ts index 758e6d5232..c8ade781a3 100644 --- a/packages/babel-helper-function-name/src/index.ts +++ b/packages/babel-helper-function-name/src/index.ts @@ -154,7 +154,12 @@ function visit(node, name, scope) { * @param {Boolean} localBinding whether a name could shadow a self-reference (e.g. converting arrow function) */ export default function ( - { node, parent, scope, id }: { node: any; parent: any; scope: any; id: any }, + { + node, + parent, + scope, + id, + }: { node: any; parent?: any; scope: any; id?: any }, localBinding = false, ) { // has an `id` so we don't need to infer one