@react-navigation/routers 8.0.0-alpha.16 → 8.0.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/BaseRouter.js +2 -2
- package/lib/module/BaseRouter.js.map +1 -1
- package/lib/module/CommonActions.js.map +1 -1
- package/lib/module/StackRouter.js +87 -74
- package/lib/module/StackRouter.js.map +1 -1
- package/lib/module/SwitchRouter.js +22 -1
- package/lib/module/SwitchRouter.js.map +1 -1
- package/lib/typescript/src/BaseRouter.d.ts.map +1 -1
- package/lib/typescript/src/CommonActions.d.ts +12 -2
- package/lib/typescript/src/CommonActions.d.ts.map +1 -1
- package/lib/typescript/src/StackRouter.d.ts +29 -2
- package/lib/typescript/src/StackRouter.d.ts.map +1 -1
- package/lib/typescript/src/SwitchRouter.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +2 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/BaseRouter.tsx +8 -6
- package/src/CommonActions.tsx +4 -4
- package/src/StackRouter.tsx +153 -117
- package/src/SwitchRouter.tsx +36 -0
- package/src/types.tsx +2 -2
package/src/types.tsx
CHANGED
|
@@ -53,7 +53,7 @@ export type InitialState = Readonly<
|
|
|
53
53
|
|
|
54
54
|
export type PartialRoute<R extends Route<string>> = Omit<R, 'key'> & {
|
|
55
55
|
key?: string | undefined;
|
|
56
|
-
state?: PartialState<NavigationState> | undefined;
|
|
56
|
+
state?: NavigationState | PartialState<NavigationState> | undefined;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
export type PartialState<State extends NavigationState> = Partial<
|
|
@@ -61,7 +61,7 @@ export type PartialState<State extends NavigationState> = Partial<
|
|
|
61
61
|
> &
|
|
62
62
|
Readonly<{
|
|
63
63
|
stale?: true | undefined;
|
|
64
|
-
routes: PartialRoute<
|
|
64
|
+
routes: PartialRoute<State['routes'][number]>[];
|
|
65
65
|
}>;
|
|
66
66
|
|
|
67
67
|
export type Route<
|