Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `ErrorComponent` component accepts the following props:

### `props.error` prop

- Type: `TError` (defaults to `Error`)
- Type: `Error`
- The error that was thrown by the component's children

### `props.info` prop
Expand Down
4 changes: 2 additions & 2 deletions packages/router-core/src/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1317,8 +1317,8 @@ export type ErrorRouteProps = {
reset: () => void
}

export type ErrorComponentProps<TError = Error> = {
error: TError
export type ErrorComponentProps = {
error: Error
Comment on lines +1320 to +1321
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the scope of the errorComponent covers both errors from the loader and errors from the component itself, using the Error type is appropriate

info?: { componentStack: string }
reset: () => void
}
Expand Down