first commit
Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled

This commit is contained in:
Arian Tron
2026-03-10 19:37:31 +03:30
commit 61f56f997c
27684 changed files with 2784175 additions and 0 deletions

View File

@@ -0,0 +1 @@
!tsconfig.json

View File

@@ -0,0 +1,32 @@
# 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 a `reset` prop
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.

View File

@@ -0,0 +1,23 @@
'use client'
import { useEffect } from 'react'
export default function Error({
error,
reset,
//^^^ fine because it's the special reset prop in an error file
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
console.error(error)
}, [error])
return (
<div>
<h2>Something went wrong!</h2>
<button onClick={() => reset()}>Try again</button>
</div>
)
}

View File

@@ -0,0 +1,19 @@
'use client'
export default function GlobalError({
error,
reset,
//^^^ fine because it's the special reset prop in a global-error file
}: {
error: Error & { digest?: string }
reset: () => void
}) {
return (
<html>
<body>
<h2>Something went wrong!</h2>
<button onClick={() => reset()}>Try again</button>
</body>
</html>
)
}

View File

@@ -0,0 +1,7 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<html>
<body>{children}</body>
</html>
)
}

View File

@@ -0,0 +1,15 @@
'use client'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const metadata = {
title: 'Metadata',
}
export function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,15 @@
'use client'
export default function Page() {
return <p>hello world</p>
}
export const metadata = {
title: 'Metadata',
}
export function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,5 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
// type `export const` to see the completions for `metadata` and `generateMetadata`.

View File

@@ -0,0 +1,5 @@
export default function Page() {
return <p>hello world</p>
}
// type `export const` to see the completions for `metadata` and `generateMetadata`.

View File

@@ -0,0 +1,3 @@
export default function Page() {
return <>hello world</>
}

View File

@@ -0,0 +1,9 @@
import { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const metadata: Metadata = {
title: 'Project Layout',
}

View File

@@ -0,0 +1,13 @@
export default async function Page(props: PageProps<'/project/[slug]'>) {
const { slug } = await props.params
return <p>project {slug}</p>
}
export const generateMetadata = async ({
params,
}: PageProps<'/project/[slug]'>) => {
const { slug } = await params
return {
title: `Project ${slug}`,
}
}

View File

@@ -0,0 +1,17 @@
'use client'
class Class {}
type ArrowFunctionTypeAlias = () => void
export default function ClientComponent(props: {
_functionAction(): void
_arrowFunctionAction: () => void
_arrowFunctionTypeAliasAction: ArrowFunctionTypeAlias
_arrowFunctionConditionalAction: (() => void) | null
// Doesn't make sense, but check for loophole
_classAction: Class
_constructorAction: new () => void
}) {
return <p>hello world</p>
}

View File

@@ -0,0 +1,16 @@
'use client'
class Class {}
type ArrowFunctionTypeAlias = () => void
export default function ClientComponent(props: {
_function(): void
_arrowFunction: () => void
_arrowFunctionTypeAlias: ArrowFunctionTypeAlias
_arrowFunctionConditional: (() => void) | null
_class: Class
_constructor: new () => void
}) {
return <p>hello world</p>
}

View File

@@ -0,0 +1,13 @@
'use client'
export default function ClientComponent(props: {
_string: string
_number: number
_boolean: boolean
_array: string[]
_object: { some: string }
_null: null
_undefined: undefined
}) {
return <p>hello world</p>
}

View File

@@ -0,0 +1,126 @@
import type { PluginLanguageService } from '../test-utils'
import ts from 'typescript'
import { relative, resolve } from 'node:path'
import { getPluginLanguageService } from '../test-utils'
type PartialDiagnostic = Pick<
ts.Diagnostic,
'code' | 'messageText' | 'start' | 'length'
>
describe('typescript-plugin - client-boundary', () => {
let languageService: PluginLanguageService
beforeAll(() => {
languageService = getPluginLanguageService(__dirname)
})
it('should not have diagnostics for serializable props', () => {
const tsFile = resolve(__dirname, 'app/serializable-props.tsx')
const totalDiagnostics: Record<string, PartialDiagnostic[]> = {}
// This test expects no diagnostics, but if somehow the test
// detects one and fails, the diagnostics output on the terminal
// is too long and omits the filename, so we filter out only the
// necessary properties for debugging.
totalDiagnostics[relative(__dirname, tsFile)] = languageService
.getSemanticDiagnostics(tsFile)
.map((diagnostic) => ({
code: diagnostic.code,
messageText: diagnostic.messageText,
start: diagnostic.start,
length: diagnostic.length,
}))
expect(totalDiagnostics).toMatchInlineSnapshot(`
{
"app/serializable-props.tsx": [],
}
`)
})
it('should not have diagnostics for non-serializable action props', () => {
const tsFile = resolve(__dirname, 'app/non-serializable-action-props.tsx')
const totalDiagnostics: Record<string, PartialDiagnostic[]> = {}
totalDiagnostics[relative(__dirname, tsFile)] = languageService
.getSemanticDiagnostics(tsFile)
.map((diagnostic) => ({
code: diagnostic.code,
messageText: diagnostic.messageText,
start: diagnostic.start,
length: diagnostic.length,
}))
expect(totalDiagnostics).toMatchInlineSnapshot(`
{
"app/non-serializable-action-props.tsx": [
{
"code": 71007,
"length": 5,
"messageText": "Props must be serializable for components in the "use client" entry file, "_classAction" is invalid.",
"start": 357,
},
{
"code": 71007,
"length": 14,
"messageText": "Props must be serializable for components in the "use client" entry file, "_constructorAction" is invalid.",
"start": 385,
},
],
}
`)
})
it('should have diagnostics for non-serializable props', () => {
const tsFile = resolve(__dirname, 'app/non-serializable-props.tsx')
const totalDiagnostics: Record<string, PartialDiagnostic[]> = {}
totalDiagnostics[relative(__dirname, tsFile)] = languageService
.getSemanticDiagnostics(tsFile)
.map((diagnostic) => ({
code: diagnostic.code,
messageText: diagnostic.messageText,
start: diagnostic.start,
length: diagnostic.length,
}))
expect(totalDiagnostics).toMatchInlineSnapshot(`
{
"app/non-serializable-props.tsx": [
{
"code": 71007,
"length": 10,
"messageText": "Props must be serializable for components in the "use client" entry file. "_arrowFunction" is a function that's not a Server Action. Rename "_arrowFunction" either to "action" or have its name end with "Action" e.g. "_arrowFunctionAction" to indicate it is a Server Action.",
"start": 159,
},
{
"code": 71007,
"length": 22,
"messageText": "Props must be serializable for components in the "use client" entry file. "_arrowFunctionTypeAlias" is a function that's not a Server Action. Rename "_arrowFunctionTypeAlias" either to "action" or have its name end with "Action" e.g. "_arrowFunctionTypeAliasAction" to indicate it is a Server Action.",
"start": 197,
},
{
"code": 71007,
"length": 19,
"messageText": "Props must be serializable for components in the "use client" entry file. "_arrowFunctionConditional" is a function that's not a Server Action. Rename "_arrowFunctionConditional" either to "action" or have its name end with "Action" e.g. "_arrowFunctionConditionalAction" to indicate it is a Server Action.",
"start": 249,
},
{
"code": 71007,
"length": 5,
"messageText": "Props must be serializable for components in the "use client" entry file, "_class" is invalid.",
"start": 279,
},
{
"code": 71007,
"length": 14,
"messageText": "Props must be serializable for components in the "use client" entry file, "_constructor" is invalid.",
"start": 301,
},
],
}
`)
})
})

View File

@@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"noEmit": true,
"incremental": true,
"module": "esnext",
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx",
".next/dev/types/**/*.ts"
],
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
}

View File

@@ -0,0 +1,18 @@
import type { PluginLanguageService } from './test-utils'
import { getPluginLanguageService } from './test-utils'
describe('typescript-plugin', () => {
let languageService: PluginLanguageService
beforeAll(() => {
languageService = getPluginLanguageService(__dirname)
})
it('should be able to get the language service', () => {
expect(languageService).toBeDefined()
const capturedLogs = languageService.getCapturedLogs()
expect(capturedLogs).toContain(
'[next] Initialized Next.js TypeScript plugin'
)
})
})

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async (): Promise<Metadata> => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async function (): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
async function generateMetadata(): Promise<Metadata> {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = (): Metadata => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = function (): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,13 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
function generateMetadata(): Metadata {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async () => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async () => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = async function () {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = async function () {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export async function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export async function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = () => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = () => {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const generateMetadata = function () {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export const generateMetadata = function () {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,9 @@
export default function Page() {
return <p>hello world</p>
}
export function generateMetadata() {
return {
title: 'Generate Metadata',
}
}

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async () => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async () => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = async function () {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = async function () {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
async function generateMetadata() {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
async function generateMetadata() {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = () => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = () => {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const generateMetadata = function () {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
const generateMetadata = function () {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
function generateMetadata() {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>hello world</p>
}
function generateMetadata() {
return {
title: 'Generate Metadata',
}
}
export { generateMetadata }

View File

@@ -0,0 +1,9 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const metadata: Metadata = {
title: 'Metadata',
}

View File

@@ -0,0 +1,9 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
export const metadata: Metadata = {
title: 'Metadata',
}

View File

@@ -0,0 +1,9 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const metadata: Metadata = {
title: 'Metadata',
}

View File

@@ -0,0 +1,9 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
export const metadata: Metadata = {
title: 'Metadata',
}

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const metadata: Metadata = {
title: 'Metadata',
}
export { metadata }

View File

@@ -0,0 +1,11 @@
import type { Metadata } from 'next'
export default function Page() {
return <p>hello world</p>
}
const metadata: Metadata = {
title: 'Metadata',
}
export { metadata }

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
const metadata: Metadata = {
title: 'Metadata',
}
export { metadata }

View File

@@ -0,0 +1,11 @@
type Metadata = { title: string }
export default function Page() {
return <p>hello world</p>
}
const metadata: Metadata = {
title: 'Metadata',
}
export { metadata }

View File

@@ -0,0 +1,7 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
export const metadata = {
title: 'Metadata',
}

View File

@@ -0,0 +1,7 @@
export default function Page() {
return <p>hello world</p>
}
export const metadata = {
title: 'Metadata',
}

Some files were not shown because too many files have changed in this diff Show More