@real-router/types 0.10.0 → 0.11.0
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/dist/cjs/index.d.ts
CHANGED
|
@@ -40,7 +40,6 @@ interface RouteTreeState<P extends Record<string, unknown> = RouteParams> {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
type Unsubscribe = () => void;
|
|
43
|
-
type CancelFn = () => void;
|
|
44
43
|
interface SimpleState<P extends Params = Params> {
|
|
45
44
|
name: string;
|
|
46
45
|
params: P;
|
|
@@ -82,7 +81,6 @@ interface RouterError extends Error {
|
|
|
82
81
|
getField: (key: string) => unknown;
|
|
83
82
|
toJSON: () => Record<string, unknown>;
|
|
84
83
|
}
|
|
85
|
-
type DoneFn = (error?: RouterError, state?: State) => void;
|
|
86
84
|
/**
|
|
87
85
|
* Configuration options that control navigation transition behavior.
|
|
88
86
|
*
|
|
@@ -415,7 +413,7 @@ interface Options {
|
|
|
415
413
|
*/
|
|
416
414
|
noValidate?: boolean;
|
|
417
415
|
}
|
|
418
|
-
type ActivationFn = (toState: State, fromState: State | undefined
|
|
416
|
+
type ActivationFn = (toState: State, fromState: State | undefined) => boolean | Promise<boolean | State | void> | State | void;
|
|
419
417
|
type DefaultDependencies = object;
|
|
420
418
|
interface Config {
|
|
421
419
|
decoders: Record<string, (params: Params) => Params>;
|
|
@@ -457,7 +455,7 @@ interface Subscription {
|
|
|
457
455
|
* For full router access, use the Router interface directly or the useRouter() hook.
|
|
458
456
|
*/
|
|
459
457
|
interface Navigator {
|
|
460
|
-
navigate: (routeName: string,
|
|
458
|
+
navigate: (routeName: string, routeParams?: Params, options?: NavigationOptions) => Promise<State>;
|
|
461
459
|
getState: () => State | undefined;
|
|
462
460
|
isActiveRoute: (name: string, params?: Params, strictEquality?: boolean, ignoreQueryParams?: boolean) => boolean;
|
|
463
461
|
canNavigateTo: (name: string, params?: Params) => boolean;
|
|
@@ -572,4 +570,4 @@ interface ErrorCodeToValueMap {
|
|
|
572
570
|
TRANSITION_CANCELLED: "CANCELLED";
|
|
573
571
|
}
|
|
574
572
|
|
|
575
|
-
export type { ActivationFn,
|
|
573
|
+
export type { ActivationFn, Config, DefaultDependencies, DefaultParamsCallback, DefaultRouteCallback, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, ForwardToCallback, LimitsConfig, Listener, Middleware, NavigationOptions, Navigator, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, Router, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js":{"bytes":569,"imports":[],"format":"esm"},"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js":{"bytes":569,"imports":[],"format":"esm"},"src/index.ts":{"bytes":1226,"imports":[{"path":"/home/runner/work/real-router/real-router/node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/cjs/index.js":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":0}}}
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -40,7 +40,6 @@ interface RouteTreeState<P extends Record<string, unknown> = RouteParams> {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
type Unsubscribe = () => void;
|
|
43
|
-
type CancelFn = () => void;
|
|
44
43
|
interface SimpleState<P extends Params = Params> {
|
|
45
44
|
name: string;
|
|
46
45
|
params: P;
|
|
@@ -82,7 +81,6 @@ interface RouterError extends Error {
|
|
|
82
81
|
getField: (key: string) => unknown;
|
|
83
82
|
toJSON: () => Record<string, unknown>;
|
|
84
83
|
}
|
|
85
|
-
type DoneFn = (error?: RouterError, state?: State) => void;
|
|
86
84
|
/**
|
|
87
85
|
* Configuration options that control navigation transition behavior.
|
|
88
86
|
*
|
|
@@ -415,7 +413,7 @@ interface Options {
|
|
|
415
413
|
*/
|
|
416
414
|
noValidate?: boolean;
|
|
417
415
|
}
|
|
418
|
-
type ActivationFn = (toState: State, fromState: State | undefined
|
|
416
|
+
type ActivationFn = (toState: State, fromState: State | undefined) => boolean | Promise<boolean | State | void> | State | void;
|
|
419
417
|
type DefaultDependencies = object;
|
|
420
418
|
interface Config {
|
|
421
419
|
decoders: Record<string, (params: Params) => Params>;
|
|
@@ -457,7 +455,7 @@ interface Subscription {
|
|
|
457
455
|
* For full router access, use the Router interface directly or the useRouter() hook.
|
|
458
456
|
*/
|
|
459
457
|
interface Navigator {
|
|
460
|
-
navigate: (routeName: string,
|
|
458
|
+
navigate: (routeName: string, routeParams?: Params, options?: NavigationOptions) => Promise<State>;
|
|
461
459
|
getState: () => State | undefined;
|
|
462
460
|
isActiveRoute: (name: string, params?: Params, strictEquality?: boolean, ignoreQueryParams?: boolean) => boolean;
|
|
463
461
|
canNavigateTo: (name: string, params?: Params) => boolean;
|
|
@@ -572,4 +570,4 @@ interface ErrorCodeToValueMap {
|
|
|
572
570
|
TRANSITION_CANCELLED: "CANCELLED";
|
|
573
571
|
}
|
|
574
572
|
|
|
575
|
-
export type { ActivationFn,
|
|
573
|
+
export type { ActivationFn, Config, DefaultDependencies, DefaultParamsCallback, DefaultRouteCallback, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, ForwardToCallback, LimitsConfig, Listener, Middleware, NavigationOptions, Navigator, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, Router, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":1226,"imports":[],"format":"esm"}},"outputs":{"dist/esm/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":0}}}
|