Unverified Commit d20dbd6c authored by Arthur's avatar Arthur Committed by GitHub

Export return type for GetStaticPaths (#16580)

* feat Export return type for GetStaticPaths

* add Duplicate generic
Co-authored-by: 's avatarLuis Alvarez D <luis@vercel.com>
parent d59f12c4
......@@ -96,12 +96,14 @@ export type InferGetStaticPropsType<T> = T extends GetStaticProps<infer P, any>
? P
: never
export type GetStaticPaths<
P extends ParsedUrlQuery = ParsedUrlQuery
> = () => Promise<{
export type GetStaticPathsResult<P extends ParsedUrlQuery = ParsedUrlQuery> = {
paths: Array<string | { params: P }>
fallback: boolean | 'unstable_blocking'
}>
}
export type GetStaticPaths<
P extends ParsedUrlQuery = ParsedUrlQuery
> = () => Promise<GetStaticPathsResult<P>>
export type GetServerSidePropsContext<
Q extends ParsedUrlQuery = ParsedUrlQuery
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment