28 lines
516 B
TypeScript
28 lines
516 B
TypeScript
import { Lang } from "./lang"
|
|
|
|
export type SearchParams<S = {}> = {
|
|
searchParams: S & { [key: string]: string }
|
|
}
|
|
|
|
export type Params<P = {}> = {
|
|
params: P
|
|
}
|
|
|
|
export type LangParams = {
|
|
lang: Lang
|
|
}
|
|
|
|
export type UriParams = {
|
|
uri?: string
|
|
}
|
|
|
|
export type PreviewParams = {
|
|
uri?: string
|
|
live_preview?: string
|
|
}
|
|
|
|
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
|
|
|
|
export type PageArgs<P = undefined, S = undefined> = LayoutArgs<P> &
|
|
(S extends undefined ? {} : SearchParams<S>)
|