Files
next.js/test/development/typescript-plugin
Jiwon ChoiandGitHub 74ce6b2e2f Reapply "Stabilize catchError and retry by removing unstable_ prefix" (#94623)
### What?

Reverts #94617, which had reverted #94610. This re-lands the
stabilization of the `catchError` API and the `retry` error prop by
removing their `unstable_` prefix across source, docs, and tests.

### Why?

#94610 was reverted in #94617 to unblock another change. This re-applies
it now that it is no longer blocked.

### How?

`git revert` of the revert commit. The repo's custom errors.json merge
driver handled the error registry: the original codes `1324`/`1325` had
been reclaimed by `instant` errors after the revert, so the reintroduced
messages were minted as new codes `1360` (`retry()` can only be used in
the App Router) and `1361` (`catchError` can only be used in Client
Components), keeping errors.json append-only.

The docs changelog adds `v16.3.0 | catchError became stable.` while
retaining the historical `v16.2.0 | unstable_catchError introduced.`
row.

### Verification

- `pnpm update-error-codes` (check_error_codes passes; errors.json in
sync)
- `pnpm build` (full JS build, exit 0)
- `pnpm --filter=next types` (exit 0)
- Not run: Rust/cargo build (`react_server_components.rs` change is a
one-line allow-list string revert; left to CI)

<!-- NEXT_JS_LLM_PR -->
2026-06-09 16:11:44 -07:00
..

typescript-plugin fixture

This fixture is used to test the TypeScript plugin. The plugin only applies to VSCode so manual testing in VSCode is required.

Getting started

  1. Install the dependencies with pnpm install
  2. Open any TypeScript file of this fixture in VSCode
  3. Change TypeScript version to use Workspace version (see https://nextjs.org/docs/app/api-reference/config/typescript#typescript-plugin)

Tests

Client component prop serialization

app/client.tsx#ClientComponent has props that can and can't be serialized. Ensure the current comments still describe the observed behavior.

app/error.tsx#Error and app/global-error.tsx#GlobalError have reset and retry props that should be excluded from the serialization check.

Client Boundary

  • client-boundary/app/non-serializable-action-props.tsx has examples of Server Action props that can't be serialized, which is allowed.
  • client-boundary/app/non-serializable-props.tsx has examples of props that can't be serialized.
  • client-boundary/app/serializable-props.tsx has examples of props that can be serialized.

Metadata

  • metadata/app/metadata/completion has examples of metadata and generateMetadata completions.
  • metadata/app/metadata/missing-type-warning has examples of metadata and generateMetadata missing type warnings.
  • metadata/app/metadata/client has examples of metadata and generateMetadata not allowed in a client component.