Skip to content

Commit 445e95e

Browse files
authored
Add type V2ClientIdentifier (#435)
1 parent 05442bb commit 445e95e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transforms/v2-to-v3/apis/getV2ClientIdentifiers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ export interface GetV2ClientIdentifiersOptions {
1010
v2GlobalName?: string;
1111
}
1212

13+
export type V2ClientIdentifier = Identifier | ThisMemberExpression;
14+
1315
export const getV2ClientIdentifiers = (
1416
j: JSCodeshift,
1517
source: Collection<unknown>,
1618
options: GetV2ClientIdentifiersOptions
17-
): (Identifier | ThisMemberExpression)[] => {
19+
): V2ClientIdentifier[] => {
1820
const namesFromNewExpr = getV2ClientIdNamesFromNewExpr(j, source, options);
1921
const namesFromTSTypeRef = getV2ClientIdNamesFromTSTypeRef(j, source, options);
2022
const clientIdNames = [...new Set([...namesFromNewExpr, ...namesFromTSTypeRef])];

0 commit comments

Comments
 (0)