From f5be80ee809d490d368902acf74eaf86f033804c Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Thu, 30 Nov 2023 19:40:12 -0800 Subject: [PATCH] Replace $Call in babel-traverse libdef with conditional type Summary: X-link: https://github.com/facebook/react-native/pull/41736 Changelog: [Internal] Reviewed By: gkz Differential Revision: D51735062 fbshipit-source-id: 942264cdc9f71e4aaa6f730d68f5a2a6e2fc7493 --- flow-typed/npm/babel-traverse_v7.x.x.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/flow-typed/npm/babel-traverse_v7.x.x.js b/flow-typed/npm/babel-traverse_v7.x.x.js index 2e3520dd23..b35fd78630 100644 --- a/flow-typed/npm/babel-traverse_v7.x.x.js +++ b/flow-typed/npm/babel-traverse_v7.x.x.js @@ -293,9 +293,6 @@ declare module '@babel/traverse' { dereference(): void; } - declare function getNodePathType(node: BabelNode): NodePath<>; - declare function getNodePathType(nodes: Array): Array>; - declare type Opts = {...}; declare export class NodePath<+TNode: BabelNode = BabelNode> { @@ -733,7 +730,7 @@ declare module '@babel/traverse' { get>( key: TKey, context?: boolean | TraversalContext, - ): $Call; + ): TNode[TKey] extends BabelNode ? NodePath<> : Array>; get( key: string,