-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6edacce
commit 1669fe6
Showing
6 changed files
with
56 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 9 additions & 16 deletions
25
packages/babel-types/src/retrievers/getOuterBindingIdentifiers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
import getBindingIdentifiers from "./getBindingIdentifiers"; | ||
import type * as t from "../types"; | ||
|
||
export default function getOuterBindingIdentifiers( | ||
node: t.Node, | ||
duplicates: true, | ||
): Record<string, Array<t.Identifier>>; | ||
|
||
export default function getOuterBindingIdentifiers( | ||
node: t.Node, | ||
duplicates?: false, | ||
): Record<string, t.Identifier>; | ||
|
||
export default function getOuterBindingIdentifiers( | ||
node: t.Node, | ||
duplicates: boolean, | ||
): Record<string, t.Identifier | Array<t.Identifier>>; | ||
export default getOuterBindingIdentifiers as { | ||
(node: t.Node, duplicates: true): Record<string, Array<t.Identifier>>; | ||
(node: t.Node, duplicates?: false): Record<string, t.Identifier>; | ||
(node: t.Node, duplicates?: boolean): | ||
| Record<string, t.Identifier> | ||
| Record<string, Array<t.Identifier>>; | ||
}; | ||
|
||
export default function getOuterBindingIdentifiers( | ||
function getOuterBindingIdentifiers( | ||
node: t.Node, | ||
duplicates: boolean, | ||
): Record<string, t.Identifier | Array<t.Identifier>> { | ||
): Record<string, t.Identifier> | Record<string, Array<t.Identifier>> { | ||
return getBindingIdentifiers(node, duplicates, true); | ||
} |