@react-navigation/core
Advanced tools
Comparing version 7.0.0-rc.12 to 7.0.0-rc.13
@@ -12,2 +12,5 @@ import type { DefaultRouterOptions, InitialState, NavigationAction, NavigationState, ParamListBase, PartialState, Route } from '@react-navigation/routers'; | ||
type Keyof<T extends {}> = Extract<keyof T, string>; | ||
type ScreenParamsPair<ParamList extends ParamListBase, RouteName extends keyof ParamList> = { | ||
[Screen in keyof ParamList]: undefined extends ParamList[Screen] ? [screen: Screen] | [screen: Screen, params: ParamList[Screen]] : [screen: Screen, params: ParamList[Screen]]; | ||
}[RouteName]; | ||
export type DefaultNavigatorOptions<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, Navigation> = DefaultRouterOptions<Keyof<ParamList>> & { | ||
@@ -166,3 +169,3 @@ /** | ||
*/ | ||
navigate<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
navigate<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -173,8 +176,10 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigate<RouteName extends keyof ParamList>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
params: ParamList[RouteName]; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigate<RouteName extends keyof ParamList>(options: { | ||
[Screen in keyof ParamList]: { | ||
name: Screen; | ||
params: ParamList[Screen]; | ||
path?: string; | ||
merge?: boolean; | ||
}; | ||
}[RouteName]): void; | ||
/** | ||
@@ -188,3 +193,3 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigateDeprecated<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
navigateDeprecated<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -197,7 +202,9 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigateDeprecated<RouteName extends keyof ParamList>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
params: ParamList[RouteName]; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends keyof ParamList>(options: { | ||
[Screen in keyof ParamList]: { | ||
name: Screen; | ||
params: ParamList[Screen]; | ||
merge?: boolean; | ||
}; | ||
}[RouteName]): void; | ||
/** | ||
@@ -209,3 +216,3 @@ * Preloads the route in current navigation tree. | ||
*/ | ||
preload<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
preload<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -212,0 +219,0 @@ * Reset the navigation state to the provided state. |
@@ -54,16 +54,16 @@ import type { NavigationAction, NavigationState, ParamListBase, PartialState, Router } from '@react-navigation/routers'; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -97,16 +97,16 @@ goBack(): void; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -113,0 +113,0 @@ goBack(): void; |
@@ -11,3 +11,3 @@ import { type DefaultRouterOptions, type NavigationAction, type NavigationState, type ParamListBase, type PartialState, type RouterFactory } from '@react-navigation/routers'; | ||
*/ | ||
export declare function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, string | undefined, State, ScreenOptions, EventMap, any> & RouterOptions): { | ||
export declare function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, (...args: any) => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, string | undefined, State, ScreenOptions, EventMap, any> & RouterOptions): { | ||
state: State; | ||
@@ -29,16 +29,16 @@ navigation: { | ||
}>>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: Readonly<{ | ||
@@ -102,16 +102,16 @@ key: string; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -145,16 +145,16 @@ goBack(): void; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -161,0 +161,0 @@ goBack(): void; |
@@ -27,16 +27,16 @@ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers'; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | import("@react-navigation/routers").PartialState<State>): void; | ||
@@ -43,0 +43,0 @@ goBack(): void; |
@@ -30,16 +30,16 @@ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers'; | ||
}>>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: Readonly<{ | ||
@@ -46,0 +46,0 @@ key: string; |
@@ -12,2 +12,5 @@ import type { DefaultRouterOptions, InitialState, NavigationAction, NavigationState, ParamListBase, PartialState, Route } from '@react-navigation/routers'; | ||
type Keyof<T extends {}> = Extract<keyof T, string>; | ||
type ScreenParamsPair<ParamList extends ParamListBase, RouteName extends keyof ParamList> = { | ||
[Screen in keyof ParamList]: undefined extends ParamList[Screen] ? [screen: Screen] | [screen: Screen, params: ParamList[Screen]] : [screen: Screen, params: ParamList[Screen]]; | ||
}[RouteName]; | ||
export type DefaultNavigatorOptions<ParamList extends ParamListBase, NavigatorID extends string | undefined, State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase, Navigation> = DefaultRouterOptions<Keyof<ParamList>> & { | ||
@@ -166,3 +169,3 @@ /** | ||
*/ | ||
navigate<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
navigate<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -173,8 +176,10 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigate<RouteName extends keyof ParamList>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
params: ParamList[RouteName]; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigate<RouteName extends keyof ParamList>(options: { | ||
[Screen in keyof ParamList]: { | ||
name: Screen; | ||
params: ParamList[Screen]; | ||
path?: string; | ||
merge?: boolean; | ||
}; | ||
}[RouteName]): void; | ||
/** | ||
@@ -188,3 +193,3 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigateDeprecated<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
navigateDeprecated<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -197,7 +202,9 @@ * Navigate to a route in current navigation tree. | ||
*/ | ||
navigateDeprecated<RouteName extends keyof ParamList>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
params: ParamList[RouteName]; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends keyof ParamList>(options: { | ||
[Screen in keyof ParamList]: { | ||
name: Screen; | ||
params: ParamList[Screen]; | ||
merge?: boolean; | ||
}; | ||
}[RouteName]): void; | ||
/** | ||
@@ -209,3 +216,3 @@ * Preloads the route in current navigation tree. | ||
*/ | ||
preload<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void; | ||
preload<RouteName extends keyof ParamList>(...args: ScreenParamsPair<ParamList, RouteName>): void; | ||
/** | ||
@@ -212,0 +219,0 @@ * Reset the navigation state to the provided state. |
@@ -54,16 +54,16 @@ import type { NavigationAction, NavigationState, ParamListBase, PartialState, Router } from '@react-navigation/routers'; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -97,16 +97,16 @@ goBack(): void; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -113,0 +113,0 @@ goBack(): void; |
@@ -11,3 +11,3 @@ import { type DefaultRouterOptions, type NavigationAction, type NavigationState, type ParamListBase, type PartialState, type RouterFactory } from '@react-navigation/routers'; | ||
*/ | ||
export declare function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, string | undefined, State, ScreenOptions, EventMap, any> & RouterOptions): { | ||
export declare function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, (...args: any) => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, string | undefined, State, ScreenOptions, EventMap, any> & RouterOptions): { | ||
state: State; | ||
@@ -29,16 +29,16 @@ navigation: { | ||
}>>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: Readonly<{ | ||
@@ -102,16 +102,16 @@ key: string; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -145,16 +145,16 @@ goBack(): void; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | PartialState<State>): void; | ||
@@ -161,0 +161,0 @@ goBack(): void; |
@@ -27,16 +27,16 @@ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers'; | ||
}> | ((state: Readonly<State>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: State | import("@react-navigation/routers").PartialState<State>): void; | ||
@@ -43,0 +43,0 @@ goBack(): void; |
@@ -30,16 +30,16 @@ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers'; | ||
}>>) => NavigationAction)): void; | ||
navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigate<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
navigate<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigate<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
path?: string; | ||
merge?: boolean; | ||
} : never): void; | ||
navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? { | ||
name: RouteName; | ||
}): void; | ||
navigateDeprecated<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
navigateDeprecated<RouteName extends string>(options: { | ||
name: string; | ||
params: object | undefined; | ||
merge?: boolean; | ||
} : never): void; | ||
preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; | ||
}): void; | ||
preload<RouteName extends string>(...args: [screen: string] | [screen: string, params: object | undefined]): void; | ||
reset(state: Readonly<{ | ||
@@ -46,0 +46,0 @@ key: string; |
{ | ||
"name": "@react-navigation/core", | ||
"description": "Core utilities for building navigators", | ||
"version": "7.0.0-rc.12", | ||
"version": "7.0.0-rc.13", | ||
"keywords": [ | ||
@@ -49,3 +49,3 @@ "react", | ||
"dependencies": { | ||
"@react-navigation/routers": "^7.0.0-rc.7", | ||
"@react-navigation/routers": "^7.0.0-rc.8", | ||
"escape-string-regexp": "^4.0.0", | ||
@@ -99,3 +99,3 @@ "nanoid": "3.3.7", | ||
}, | ||
"gitHead": "1a26dd67e4b9625075e6e5229736d1c679c67ccb" | ||
"gitHead": "b32550a43d0e2b532cfe100d9cf17837184a636e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1368107