@solidjs/router 0.15.0 → 0.15.1
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/data/action.d.ts +1 -1
- package/dist/data/action.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/data/action.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export declare function useAction<T extends Array<any>, U, V>(action: Action<T,
|
|
|
13
13
|
export declare function action<T extends Array<any>, U = void>(fn: (...args: T) => Promise<U>, name?: string): Action<T, U>;
|
|
14
14
|
export declare function action<T extends Array<any>, U = void>(fn: (...args: T) => Promise<U>, options?: {
|
|
15
15
|
name?: string;
|
|
16
|
-
onComplete?: (s: Submission<T, U>) =>
|
|
16
|
+
onComplete?: (s: Submission<T, U>) => void;
|
|
17
17
|
}): Action<T, U>;
|
package/dist/data/action.js
CHANGED
|
@@ -47,7 +47,7 @@ export function action(fn, options = {}) {
|
|
|
47
47
|
return async (res) => {
|
|
48
48
|
const result = await handleResponse(res, error, router.navigatorFactory());
|
|
49
49
|
let retry = null;
|
|
50
|
-
|
|
50
|
+
o.onComplete?.({
|
|
51
51
|
...submission,
|
|
52
52
|
result: result?.data,
|
|
53
53
|
error: result?.error,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export * from "./lifecycle.js";
|
|
|
4
4
|
export { useHref, useIsRouting, useLocation, useMatch, useCurrentMatches, useNavigate, useParams, useResolvedPath, useSearchParams, useBeforeLeave, usePreloadRoute } from "./routing.js";
|
|
5
5
|
export { mergeSearchString as _mergeSearchString } from "./utils.js";
|
|
6
6
|
export * from "./data/index.js";
|
|
7
|
-
export type { Location, LocationChange, MatchFilter, MatchFilters, NavigateOptions, Navigator, OutputMatch, Params, PathMatch, RouteSectionProps, RoutePreloadFunc, RoutePreloadFuncArgs, RouteDefinition, RouteDescription, RouteMatch, RouterIntegration, RouterUtils, SetParams, BeforeLeaveEventArgs, RouteLoadFunc, RouteLoadFuncArgs, RouterResponseInit, CustomResponse } from "./types.js";
|
|
7
|
+
export type { Location, LocationChange, MatchFilter, MatchFilters, NavigateOptions, Navigator, OutputMatch, Params, PathMatch, RouteSectionProps, RoutePreloadFunc, RoutePreloadFuncArgs, RouteDefinition, RouteDescription, RouteMatch, RouterIntegration, RouterUtils, SetParams, Submission, BeforeLeaveEventArgs, RouteLoadFunc, RouteLoadFuncArgs, RouterResponseInit, CustomResponse } from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -1118,7 +1118,7 @@ function action(fn, options = {}) {
|
|
|
1118
1118
|
return async res => {
|
|
1119
1119
|
const result = await handleResponse(res, error, router.navigatorFactory());
|
|
1120
1120
|
let retry = null;
|
|
1121
|
-
|
|
1121
|
+
o.onComplete?.({
|
|
1122
1122
|
...submission,
|
|
1123
1123
|
result: result?.data,
|
|
1124
1124
|
error: result?.error,
|