Skip to content

Commit

Permalink
feat: export the unioned types of CreateMagicLinkArgs for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
ctran88 committed Jan 9, 2025
1 parent 42efdd3 commit 031eea2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/classes/Auth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ type MagicLinkArgsBase = {
send: boolean;
};

type MagicLinkWithEmailArgs = { email: string } & MagicLinkArgsBase;
type MagicLinkWithPhoneArgs = { phone: string } & MagicLinkArgsBase;
type MagicLinkWithUserArgs = { userId: string; channel: MagicLinkChannel } & MagicLinkArgsBase;

export type MagicLinkWithEmailArgs = { email: string } & MagicLinkArgsBase;
export type MagicLinkWithPhoneArgs = { phone: string } & MagicLinkArgsBase;
export type MagicLinkWithUserArgs = { userId: string; channel: MagicLinkChannel } & MagicLinkArgsBase;
export type CreateMagicLinkArgs = MagicLinkWithEmailArgs | MagicLinkWithPhoneArgs | MagicLinkWithUserArgs;
export type MagicLinkOptions = {
language?: MagicLinkLanguage;
Expand Down

0 comments on commit 031eea2

Please sign in to comment.