mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What? Clarifies the misleading `// Pages Router only` comment at the top of `packages/next/error.d.ts` and `packages/next/src/api/error.ts`. ### Why? The blanket comment implies the entire `next/error` module is Pages Router only. However, `unstable_catchError` is a named export from the same module that works in App Router Client Components (it's loaded from `client/components/catch-error`). Developers and AI agents reading the file would distrust or skip the import based on the top-level comment. ### How? Changed the comment from `// Pages Router only` to `// Default export is Pages Router only` in both files, scoping it accurately to just the `Error` default export.
8 lines
236 B
TypeScript
8 lines
236 B
TypeScript
// Default export is Pages Router only
|
|
import Error from './dist/api/error'
|
|
export * from './dist/api/error'
|
|
export default Error
|
|
|
|
export { unstable_catchError } from './dist/api/error'
|
|
export type { ErrorInfo } from './dist/api/error'
|