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
- Install the dependencies with
pnpm install - Open any TypeScript file of this fixture in VSCode
- 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 a reset prop
that should be excluded from the serialization check.
Client Boundary
client-boundary/app/non-serializable-action-props.tsxhas examples of Server Action props that can't be serialized, which is allowed.client-boundary/app/non-serializable-props.tsxhas examples of props that can't be serialized.client-boundary/app/serializable-props.tsxhas examples of props that can be serialized.
Metadata
metadata/app/metadata/completionhas examples of metadata and generateMetadata completions.metadata/app/metadata/missing-type-warninghas examples of metadata and generateMetadata missing type warnings.metadata/app/metadata/clienthas examples of metadata and generateMetadata not allowed in a client component.