23 lines
455 B
TypeScript
23 lines
455 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 LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>;
|
|
|
|
export type PageArgs<P = undefined, S = undefined> = LayoutArgs<P> &
|
|
(S extends undefined ? {} : SearchParams<S>);
|