diff --git a/packages/next/build/webpack/plugins/flight-types-plugin.ts b/packages/next/build/webpack/plugins/flight-types-plugin.ts index f16fcdcb939d0..55cb1cb4cb4a2 100644 --- a/packages/next/build/webpack/plugins/flight-types-plugin.ts +++ b/packages/next/build/webpack/plugins/flight-types-plugin.ts @@ -25,8 +25,15 @@ type TEntry = typeof entry check(entry) -type PageProps = { params?: any } -type LayoutProps = { children: React.ReactNode; params?: any } +type PageParams = Record +interface PageProps { + params?: PageParams + searchParams?: Record +} +interface LayoutProps { + children: React.ReactNode + params?: PageParams +} type PageComponent = (props: PageProps) => React.ReactNode | null type LayoutComponent = (props: LayoutProps) => React.ReactNode | null @@ -39,7 +46,7 @@ interface IEntry { } config?: {} Head?: any - generateStaticParams?: (params?:any) => Promise + generateStaticParams?: (params?: PageParams) => Promise revalidate?: RevalidateRange | false dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static' dynamicParams?: boolean