Skip to content

Commit

Permalink
Replace $Call in babel-traverse libdef with conditional type (#41736)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #41736

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D51735062

fbshipit-source-id: 942264cdc9f71e4aaa6f730d68f5a2a6e2fc7493
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 1, 2023
1 parent 89ec746 commit cd9b1d9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions flow-typed/npm/babel-traverse_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ declare module '@babel/traverse' {
dereference(): void;
}

declare function getNodePathType(node: BabelNode): NodePath<>;
declare function getNodePathType(nodes: Array<BabelNode>): Array<NodePath<>>;

declare type Opts = {...};

declare export class NodePath<+TNode: BabelNode = BabelNode> {
Expand Down Expand Up @@ -733,7 +730,7 @@ declare module '@babel/traverse' {
get<TKey: $Keys<TNode>>(
key: TKey,
context?: boolean | TraversalContext,
): $Call<typeof getNodePathType, TNode[TKey]>;
): TNode[TKey] extends BabelNode ? NodePath<> : Array<NodePath<>>;

get(
key: string,
Expand Down

0 comments on commit cd9b1d9

Please sign in to comment.