11import type * as Kit from '@sveltejs/kit' ;
22
33type Expand < T > = T extends infer O ? { [ K in keyof O ] : O [ K ] } : never ;
4- type RouteParams = { optional : string | void }
4+ type RouteParams = { optional ? : string } ;
55type MaybeWithVoid < T > = { } extends T ? T | void : T ;
6- export type RequiredKeys < T > = { [ K in keyof T ] -?: { } extends { [ P in K ] : T [ K ] } ? never : K ; } [ keyof T ] ;
7- type OutputDataShape < T > = MaybeWithVoid < Omit < App . PageData , RequiredKeys < T > > & Partial < Pick < App . PageData , keyof T & keyof App . PageData > > & Record < string , any > >
6+ export type RequiredKeys < T > = {
7+ [ K in keyof T ] -?: { } extends { [ P in K ] : T [ K ] } ? never : K ;
8+ } [ keyof T ] ;
9+ type OutputDataShape < T > = MaybeWithVoid <
10+ Omit < App . PageData , RequiredKeys < T > > &
11+ Partial < Pick < App . PageData , keyof T & keyof App . PageData > > &
12+ Record < string , any >
13+ > ;
814type EnsureDefined < T > = T extends null | undefined ? { } : T ;
915type PageParentData = EnsureDefined < import ( '../../$types.js' ) . LayoutData > ;
1016
1117export type PageServerData = null ;
12- export type PageLoad < OutputData extends OutputDataShape < PageParentData > = OutputDataShape < PageParentData > > = Kit . Load < RouteParams , PageServerData , PageParentData , OutputData > ;
18+ export type PageLoad <
19+ OutputData extends OutputDataShape < PageParentData > = OutputDataShape < PageParentData >
20+ > = Kit . Load < RouteParams , PageServerData , PageParentData , OutputData > ;
1321export type PageLoadEvent = Parameters < PageLoad > [ 0 ] ;
14- export type PageData = Expand < Omit < PageParentData , keyof Kit . AwaitedProperties < Awaited < ReturnType < typeof import ( '../../../../../../x/[[optional]]/+page.js' ) . load > > > > & EnsureDefined < Kit . AwaitedProperties < Awaited < ReturnType < typeof import ( '../../../../../../x/[[optional]]/+page.js' ) . load > > > > > ;
22+ export type PageData = Expand <
23+ Omit <
24+ PageParentData ,
25+ keyof Kit . AwaitedProperties <
26+ Awaited <
27+ ReturnType < typeof import ( '../../../../../../../../../../x/[[optional]]/+page.js' ) . load >
28+ >
29+ >
30+ > &
31+ EnsureDefined <
32+ Kit . AwaitedProperties <
33+ Awaited <
34+ ReturnType < typeof import ( '../../../../../../../../../../x/[[optional]]/+page.js' ) . load >
35+ >
36+ >
37+ >
38+ > ;
0 commit comments