|
|
|
@@ -11,14 +11,28 @@ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Pa
|
|
|
|
|
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
|
|
|
|
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
|
|
|
|
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
|
|
|
|
type PageServerParentData = EnsureDefined<LayoutServerData>;
|
|
|
|
|
type PageParentData = EnsureDefined<LayoutData>;
|
|
|
|
|
type LayoutRouteId = RouteId | "/" | null
|
|
|
|
|
type LayoutParams = RouteParams & { }
|
|
|
|
|
type LayoutServerParentData = EnsureDefined<{}>;
|
|
|
|
|
type LayoutParentData = EnsureDefined<{}>;
|
|
|
|
|
|
|
|
|
|
export type PageServerData = null;
|
|
|
|
|
export type PageData = Expand<PageParentData>;
|
|
|
|
|
export type PageProps = { params: RouteParams; data: PageData }
|
|
|
|
|
export type LayoutServerData = null;
|
|
|
|
|
export type LayoutData = Expand<LayoutParentData>;
|
|
|
|
|
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
|
|
|
|
export type PageServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
|
|
|
|
|
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
|
|
|
export type ActionData = unknown;
|
|
|
|
|
export type PageServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.server.js').load>>>>>>;
|
|
|
|
|
export type PageLoad<OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData, RouteId>;
|
|
|
|
|
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
|
|
|
export type PageData = Expand<Omit<PageParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>>>>;
|
|
|
|
|
export type Action<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Action<RouteParams, OutputData, RouteId>
|
|
|
|
|
export type Actions<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Actions<RouteParams, OutputData, RouteId>
|
|
|
|
|
export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
|
|
|
|
|
export type LayoutServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.ServerLoad<LayoutParams, LayoutServerParentData, OutputData, LayoutRouteId>;
|
|
|
|
|
export type LayoutServerLoadEvent = Parameters<LayoutServerLoad>[0];
|
|
|
|
|
export type LayoutServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.server.js').load>>>>>>;
|
|
|
|
|
export type LayoutLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData, LayoutRouteId>;
|
|
|
|
|
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
|
|
|
export type LayoutData = Expand<Omit<LayoutParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>>>>;
|
|
|
|
|
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
|
|
|
|
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|