Skip to content

Commit

Permalink
fix(types): Add NavigationOptions in retheme
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl committed Nov 28, 2023
1 parent 9a1fe37 commit 73458f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/types/src/clerk.retheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,15 @@ export type BuildUrlWithAuthParams = {

// TODO: Make sure Isomorphic Clerk navigate can work with the correct type:
// (to: string) => Promise<unknown>
export type CustomNavigation = (to: string) => Promise<unknown> | void;
export type CustomNavigation = (to: string, options?: NavigateOptions) => Promise<unknown> | void;

export type ClerkThemeOptions = DeepSnakeToCamel<DeepPartial<DisplayThemeJSON>>;

export interface ClerkOptions {
appearance?: Appearance;
localization?: LocalizationResource;
navigate?: (to: string) => Promise<unknown> | unknown;
routerPush?: (to: string) => Promise<unknown> | unknown;
routerReplace?: (to: string) => Promise<unknown> | unknown;
polling?: boolean;
selectInitialSession?: (client: ClientResource) => ActiveSessionResource | null;
/** Controls if ClerkJS will load with the standard browser setup using Clerk cookies */
Expand Down Expand Up @@ -539,6 +540,10 @@ export interface ClerkOptions {
sdkMetadata?: SDKMetadata;
}

export interface NavigateOptions {
replace?: boolean;
}

export interface Resources {
client: ClientResource;
session?: ActiveSessionResource | null;
Expand Down

0 comments on commit 73458f0

Please sign in to comment.