Skip to content

Commit

Permalink
use interface for page and layout props
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 23, 2022
1 parent 17f94e0 commit d0e1290
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/next/build/webpack/plugins/flight-types-plugin.ts
Expand Up @@ -26,8 +26,14 @@ type TEntry = typeof entry
check<IEntry, TEntry>(entry)
type PageParams = Record<string, string>
type PageProps = { params?: PageParams, searchParams?: Record<string, string | string[]> }
type LayoutProps = { children: React.ReactNode; params?: PageParams }
interface PageProps {
params?: PageParams
searchParams?: Record<string, string | string[]>
}
interface LayoutProps {
children: React.ReactNode
params?: PageParams
}
type PageComponent = (props: PageProps) => React.ReactNode | null
type LayoutComponent = (props: LayoutProps) => React.ReactNode | null
Expand Down

0 comments on commit d0e1290

Please sign in to comment.