Created
December 19, 2022 22:21
-
-
Save raynirola/0d58ebdafec28a6009331faee31c9392 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Params<T = Record<string, string>> = T | |
type SearchParams<T = Record<string, string | string[] | undefined>> = T | |
interface PageProps<P, S> { | |
params: Params<P> | |
searchParams: SearchParams<S> | |
} | |
interface LayoutProps<P> { | |
children: React.ReactNode | |
params?: Params<P> | |
} | |
export interface Page<T = Params, S = SearchParams> extends React.FC<PageProps<T, S>> {} | |
export interface Layout<T = Params> extends React.FC<LayoutProps<T>> {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment