Skip to content

Commit 9852bb0

Browse files
authoredAug 23, 2023
name change (#10812)
1 parent a4495de commit 9852bb0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎.changeset/error-response-type.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"@remix-run/router": patch
77
---
88

9-
Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponse` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`.
9+
Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`.

‎packages/react-router-dom/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import {
4949
createHashHistory,
5050
joinPaths,
5151
stripBasename,
52-
UNSAFE_ErrorResponse as ErrorResponseImpl,
52+
UNSAFE_ErrorResponseImpl as ErrorResponseImpl,
5353
UNSAFE_invariant as invariant,
5454
UNSAFE_warning as warning,
5555
} from "@remix-run/router";

‎packages/router/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export * from "./router";
8282
export type { RouteManifest as UNSAFE_RouteManifest } from "./utils";
8383
export {
8484
DeferredData as UNSAFE_DeferredData,
85-
ErrorResponseImpl as UNSAFE_ErrorResponse,
85+
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
8686
convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes,
8787
getPathContributingMatches as UNSAFE_getPathContributingMatches,
8888
} from "./utils";

0 commit comments

Comments
 (0)
Please sign in to comment.