Skip to content

Commit baa7543

Browse files
committed
Rename type to unstable_ClientHandleErrorFunction
1 parent 7f2b363 commit baa7543

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

packages/react-router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export type {
9797
export type {
9898
AwaitProps,
9999
IndexRouteProps,
100-
unstable_HandleErrorFunction,
100+
unstable_ClientHandleErrorFunction,
101101
LayoutRouteProps,
102102
MemoryRouterOpts,
103103
MemoryRouterProps,

packages/react-router/lib/components.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class Deferred<T> {
249249
* Function signature for client side error handling for loader/actions errors
250250
* and rendering errors via `componentDidCatch`
251251
*/
252-
export interface unstable_HandleErrorFunction {
252+
export interface unstable_ClientHandleErrorFunction {
253253
(
254254
error: unknown,
255255
info: {
@@ -297,7 +297,7 @@ export interface RouterProviderProps {
297297
* }} />
298298
* ```
299299
*/
300-
unstable_handleError?: unstable_HandleErrorFunction;
300+
unstable_handleError?: unstable_ClientHandleErrorFunction;
301301
}
302302

303303
/**
@@ -616,7 +616,7 @@ function DataRoutes({
616616
routes: DataRouteObject[];
617617
future: DataRouter["future"];
618618
state: RouterState;
619-
unstable_handleError: unstable_HandleErrorFunction | undefined;
619+
unstable_handleError: unstable_ClientHandleErrorFunction | undefined;
620620
}): React.ReactElement | null {
621621
return useRoutesImpl(routes, undefined, state, unstable_handleError, future);
622622
}
@@ -1421,7 +1421,7 @@ type AwaitErrorBoundaryProps = React.PropsWithChildren<{
14211421
errorElement?: React.ReactNode;
14221422
resolve: TrackedPromise | any;
14231423
location?: Location;
1424-
unstable_handleError?: unstable_HandleErrorFunction;
1424+
unstable_handleError?: unstable_ClientHandleErrorFunction;
14251425
}>;
14261426

14271427
type AwaitErrorBoundaryState = {

packages/react-router/lib/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import type { unstable_HandleErrorFunction } from "./components";
2+
import type { unstable_ClientHandleErrorFunction } from "./components";
33
import type {
44
History,
55
Location,
@@ -91,7 +91,7 @@ export interface DataRouterContextObject
9191
extends Omit<NavigationContextObject, "future"> {
9292
router: Router;
9393
staticContext?: StaticHandlerContext;
94-
unstable_handleError?: unstable_HandleErrorFunction;
94+
unstable_handleError?: unstable_ClientHandleErrorFunction;
9595
}
9696

9797
export const DataRouterContext =

packages/react-router/lib/dom-export/hydrated-router.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
DataRouter,
77
HydrationState,
88
RouterInit,
9-
unstable_HandleErrorFunction,
9+
unstable_ClientHandleErrorFunction,
1010
} from "react-router";
1111
import {
1212
UNSAFE_getHydrationData as getHydrationData,
@@ -243,7 +243,7 @@ export interface HydratedRouterProps {
243243
* }} />
244244
* ```
245245
*/
246-
unstable_handleError?: unstable_HandleErrorFunction;
246+
unstable_handleError?: unstable_ClientHandleErrorFunction;
247247
}
248248

249249
/**

packages/react-router/lib/hooks.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {
5151
stripBasename,
5252
} from "./router/utils";
5353
import type { SerializeFrom } from "./types/route-data";
54-
import { unstable_HandleErrorFunction } from "./components";
54+
import { unstable_ClientHandleErrorFunction } from "./components";
5555

5656
/**
5757
* Resolves a URL against the current {@link Location}.
@@ -708,7 +708,7 @@ export function useRoutesImpl(
708708
routes: RouteObject[],
709709
locationArg?: Partial<Location> | string,
710710
dataRouterState?: DataRouter["state"],
711-
unstable_handleError?: unstable_HandleErrorFunction,
711+
unstable_handleError?: unstable_ClientHandleErrorFunction,
712712
future?: DataRouter["future"],
713713
): React.ReactElement | null {
714714
invariant(
@@ -929,7 +929,7 @@ type RenderErrorBoundaryProps = React.PropsWithChildren<{
929929
error: any;
930930
component: React.ReactNode;
931931
routeContext: RouteContextObject;
932-
unstable_handleError: unstable_HandleErrorFunction | null;
932+
unstable_handleError: unstable_ClientHandleErrorFunction | null;
933933
}>;
934934

935935
type RenderErrorBoundaryState = {
@@ -1048,7 +1048,7 @@ export function _renderMatches(
10481048
matches: RouteMatch[] | null,
10491049
parentMatches: RouteMatch[] = [],
10501050
dataRouterState: DataRouter["state"] | null = null,
1051-
unstable_handleError: unstable_HandleErrorFunction | null = null,
1051+
unstable_handleError: unstable_ClientHandleErrorFunction | null = null,
10521052
future: DataRouter["future"] | null = null,
10531053
): React.ReactElement | null {
10541054
if (matches == null) {

0 commit comments

Comments
 (0)