@sveltejs/kit 1.0.0-next.23 → 1.0.0-next.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/assets/app/env.js +20 -0
- package/assets/app/navigation.js +81 -0
- package/assets/app/paths.js +1 -0
- package/assets/{runtime/app → app}/stores.js +19 -15
- package/assets/chunks/utils.js +13 -0
- package/assets/client/singletons.js +18 -0
- package/assets/client/start.js +1382 -0
- package/assets/components/error.svelte +19 -3
- package/assets/env.js +8 -0
- package/assets/paths.js +13 -0
- package/assets/server/index.js +1998 -0
- package/dist/chunks/cert.js +28154 -0
- package/dist/chunks/index.js +2391 -0
- package/dist/chunks/index2.js +807 -0
- package/dist/chunks/index3.js +648 -0
- package/dist/chunks/index4.js +109 -0
- package/dist/chunks/index5.js +754 -0
- package/dist/chunks/index6.js +830 -0
- package/dist/chunks/index7.js +15574 -0
- package/dist/chunks/index8.js +4207 -0
- package/dist/chunks/misc.js +3 -0
- package/dist/chunks/multipart-parser.js +449 -0
- package/dist/chunks/url.js +62 -0
- package/dist/cli.js +1039 -84
- package/dist/hooks.js +28 -0
- package/dist/install-fetch.js +6514 -0
- package/dist/node.js +51 -0
- package/package.json +93 -54
- package/svelte-kit.js +2 -0
- package/types/ambient-modules.d.ts +204 -0
- package/types/app.d.ts +45 -0
- package/types/config.d.ts +169 -0
- package/types/endpoint.d.ts +20 -0
- package/types/helper.d.ts +53 -0
- package/types/hooks.d.ts +55 -0
- package/types/index.d.ts +18 -0
- package/types/internal.d.ts +237 -0
- package/types/page.d.ts +73 -0
- package/CHANGELOG.md +0 -294
- package/assets/runtime/app/navigation.js +0 -23
- package/assets/runtime/app/navigation.js.map +0 -1
- package/assets/runtime/app/paths.js +0 -2
- package/assets/runtime/app/paths.js.map +0 -1
- package/assets/runtime/app/stores.js.map +0 -1
- package/assets/runtime/internal/singletons.js +0 -15
- package/assets/runtime/internal/singletons.js.map +0 -1
- package/assets/runtime/internal/start.js +0 -591
- package/assets/runtime/internal/start.js.map +0 -1
- package/assets/runtime/utils-85ebcc60.js +0 -18
- package/assets/runtime/utils-85ebcc60.js.map +0 -1
- package/dist/api.js +0 -44
- package/dist/api.js.map +0 -1
- package/dist/build.js +0 -246
- package/dist/build.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/colors.js +0 -37
- package/dist/colors.js.map +0 -1
- package/dist/create_app.js +0 -578
- package/dist/create_app.js.map +0 -1
- package/dist/index.js +0 -367
- package/dist/index.js.map +0 -1
- package/dist/index2.js +0 -12044
- package/dist/index2.js.map +0 -1
- package/dist/index3.js +0 -547
- package/dist/index3.js.map +0 -1
- package/dist/index4.js +0 -73
- package/dist/index4.js.map +0 -1
- package/dist/index5.js +0 -464
- package/dist/index5.js.map +0 -1
- package/dist/index6.js +0 -729
- package/dist/index6.js.map +0 -1
- package/dist/logging.js +0 -43
- package/dist/logging.js.map +0 -1
- package/dist/package.js +0 -432
- package/dist/package.js.map +0 -1
- package/dist/renderer.js +0 -2391
- package/dist/renderer.js.map +0 -1
- package/dist/standard.js +0 -101
- package/dist/standard.js.map +0 -1
- package/dist/utils.js +0 -54
- package/dist/utils.js.map +0 -1
- package/svelte-kit +0 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
interface ReadOnlyFormData {
|
|
2
|
+
get(key: string): string | null;
|
|
3
|
+
getAll(key: string): string[];
|
|
4
|
+
has(key: string): boolean;
|
|
5
|
+
entries(): Generator<[string, string], void>;
|
|
6
|
+
keys(): Generator<string, void>;
|
|
7
|
+
values(): Generator<string, void>;
|
|
8
|
+
[Symbol.iterator](): Generator<[string, string], void>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type ToJSON = { toJSON(...args: any[]): JSONValue };
|
|
12
|
+
type JSONValue = Exclude<JSONString, ToJSON>;
|
|
13
|
+
export type JSONString =
|
|
14
|
+
| string
|
|
15
|
+
| number
|
|
16
|
+
| boolean
|
|
17
|
+
| null
|
|
18
|
+
| ToJSON
|
|
19
|
+
| JSONString[]
|
|
20
|
+
| { [key: string]: JSONString };
|
|
21
|
+
|
|
22
|
+
/** `string[]` is only for set-cookie, everything else must be type of `string` */
|
|
23
|
+
export type ResponseHeaders = Record<string, string | string[]>;
|
|
24
|
+
export type RequestHeaders = Record<string, string>;
|
|
25
|
+
|
|
26
|
+
// Utility Types
|
|
27
|
+
export type InferValue<T, Key extends keyof T, Default> = T extends Record<Key, infer Val>
|
|
28
|
+
? Val
|
|
29
|
+
: Default;
|
|
30
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
31
|
+
export type Rec<T = any> = Record<string, T>;
|
|
32
|
+
export type RecursiveRequired<T> = {
|
|
33
|
+
// Recursive implementation of TypeScript's Required utility type.
|
|
34
|
+
// Will recursively continue until it reaches primitive or union
|
|
35
|
+
// with a Function in it, except those commented below
|
|
36
|
+
[K in keyof T]-?: Extract<T[K], Function> extends never // If it does not have a Function type
|
|
37
|
+
? RecursiveRequired<T[K]> // recursively continue through.
|
|
38
|
+
: K extends 'vite' // If it reaches the 'vite' key
|
|
39
|
+
? Extract<T[K], Function> // only take the Function type.
|
|
40
|
+
: T[K]; // Use the exact type for everything else
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type Only<T, U> = {
|
|
44
|
+
[P in keyof T]: T[P];
|
|
45
|
+
} & {
|
|
46
|
+
[P in keyof U]?: never;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type Either<T, U> = Only<T, U> | Only<U, T>;
|
|
50
|
+
|
|
51
|
+
export interface Fallthrough {
|
|
52
|
+
fallthrough: true;
|
|
53
|
+
}
|
package/types/hooks.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ParameterizedBody, RawBody } from './app';
|
|
2
|
+
import { MaybePromise, RequestHeaders, ResponseHeaders } from './helper';
|
|
3
|
+
|
|
4
|
+
export type StrictBody = string | Uint8Array;
|
|
5
|
+
|
|
6
|
+
export interface ServerRequest<Locals = Record<string, any>, Body = unknown> {
|
|
7
|
+
url: URL;
|
|
8
|
+
method: string;
|
|
9
|
+
headers: RequestHeaders;
|
|
10
|
+
rawBody: RawBody;
|
|
11
|
+
params: Record<string, string>;
|
|
12
|
+
body: ParameterizedBody<Body>;
|
|
13
|
+
locals: Locals;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ServerResponse {
|
|
17
|
+
status: number;
|
|
18
|
+
headers: Partial<ResponseHeaders>;
|
|
19
|
+
body?: StrictBody;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GetSession<Locals = Record<string, any>, Body = unknown, Session = any> {
|
|
23
|
+
(request: ServerRequest<Locals, Body>): MaybePromise<Session>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ResolveOpts {
|
|
27
|
+
ssr?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Handle<Locals = Record<string, any>, Body = unknown> {
|
|
31
|
+
(input: {
|
|
32
|
+
request: ServerRequest<Locals, Body>;
|
|
33
|
+
resolve(request: ServerRequest<Locals, Body>, opts?: ResolveOpts): MaybePromise<ServerResponse>;
|
|
34
|
+
}): MaybePromise<ServerResponse>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// internally, `resolve` could return `undefined`, so we differentiate InternalHandle
|
|
38
|
+
// from the public Handle type
|
|
39
|
+
export interface InternalHandle<Locals = Record<string, any>, Body = unknown> {
|
|
40
|
+
(input: {
|
|
41
|
+
request: ServerRequest<Locals, Body>;
|
|
42
|
+
resolve(
|
|
43
|
+
request: ServerRequest<Locals, Body>,
|
|
44
|
+
opts?: ResolveOpts
|
|
45
|
+
): MaybePromise<ServerResponse | undefined>;
|
|
46
|
+
}): MaybePromise<ServerResponse | undefined>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface HandleError<Locals = Record<string, any>, Body = unknown> {
|
|
50
|
+
(input: { error: Error & { frame?: string }; request: ServerRequest<Locals, Body> }): void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ExternalFetch {
|
|
54
|
+
(req: Request): Promise<Response>;
|
|
55
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="svelte" />
|
|
2
|
+
/// <reference types="vite/client" />
|
|
3
|
+
|
|
4
|
+
import './ambient-modules';
|
|
5
|
+
|
|
6
|
+
export { App, IncomingRequest, RawBody, SSRManifest } from './app';
|
|
7
|
+
export { Adapter, Builder, Config, PrerenderErrorHandler, ValidatedConfig } from './config';
|
|
8
|
+
export { EndpointOutput, RequestHandler } from './endpoint';
|
|
9
|
+
export { ErrorLoad, ErrorLoadInput, Load, LoadInput, LoadOutput } from './page';
|
|
10
|
+
export {
|
|
11
|
+
ExternalFetch,
|
|
12
|
+
GetSession,
|
|
13
|
+
Handle,
|
|
14
|
+
HandleError,
|
|
15
|
+
ServerRequest as Request,
|
|
16
|
+
ServerResponse as Response,
|
|
17
|
+
ResolveOpts
|
|
18
|
+
} from './hooks';
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
+
import { RequestHandler } from './endpoint';
|
|
3
|
+
import { InternalApp, SSRManifest } from './app';
|
|
4
|
+
import {
|
|
5
|
+
ExternalFetch,
|
|
6
|
+
GetSession,
|
|
7
|
+
HandleError,
|
|
8
|
+
InternalHandle,
|
|
9
|
+
ServerRequest,
|
|
10
|
+
ServerResponse
|
|
11
|
+
} from './hooks';
|
|
12
|
+
import { Load } from './page';
|
|
13
|
+
import { Either, Fallthrough } from './helper';
|
|
14
|
+
|
|
15
|
+
type PageId = string;
|
|
16
|
+
|
|
17
|
+
export interface PrerenderOptions {
|
|
18
|
+
fallback?: string;
|
|
19
|
+
all: boolean;
|
|
20
|
+
dependencies: Map<string, ServerResponse>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AppModule {
|
|
24
|
+
App: typeof InternalApp;
|
|
25
|
+
|
|
26
|
+
override(options: {
|
|
27
|
+
paths: {
|
|
28
|
+
base: string;
|
|
29
|
+
assets: string;
|
|
30
|
+
};
|
|
31
|
+
prerendering: boolean;
|
|
32
|
+
protocol?: 'http' | 'https';
|
|
33
|
+
read(file: string): Buffer;
|
|
34
|
+
}): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Logger {
|
|
38
|
+
(msg: string): void;
|
|
39
|
+
success(msg: string): void;
|
|
40
|
+
error(msg: string): void;
|
|
41
|
+
warn(msg: string): void;
|
|
42
|
+
minor(msg: string): void;
|
|
43
|
+
info(msg: string): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface SSRComponent {
|
|
47
|
+
router?: boolean;
|
|
48
|
+
hydrate?: boolean;
|
|
49
|
+
prerender?: boolean;
|
|
50
|
+
load: Load;
|
|
51
|
+
default: {
|
|
52
|
+
render(props: Record<string, any>): {
|
|
53
|
+
html: string;
|
|
54
|
+
head: string;
|
|
55
|
+
css: {
|
|
56
|
+
code: string;
|
|
57
|
+
map: any; // TODO
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type SSRComponentLoader = () => Promise<SSRComponent>;
|
|
64
|
+
|
|
65
|
+
export type CSRComponent = any; // TODO
|
|
66
|
+
|
|
67
|
+
export type CSRComponentLoader = () => Promise<CSRComponent>;
|
|
68
|
+
|
|
69
|
+
export interface SSRPagePart {
|
|
70
|
+
id: string;
|
|
71
|
+
load: SSRComponentLoader;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type GetParams = (match: RegExpExecArray) => Record<string, string>;
|
|
75
|
+
|
|
76
|
+
export interface SSRPage {
|
|
77
|
+
type: 'page';
|
|
78
|
+
pattern: RegExp;
|
|
79
|
+
params: GetParams;
|
|
80
|
+
/**
|
|
81
|
+
* plan a is to render 1 or more layout components followed by a leaf component.
|
|
82
|
+
*/
|
|
83
|
+
a: number[];
|
|
84
|
+
/**
|
|
85
|
+
* plan b — if one of them components fails in `load` we backtrack until we find
|
|
86
|
+
* the nearest error component.
|
|
87
|
+
*/
|
|
88
|
+
b: number[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface SSREndpoint {
|
|
92
|
+
type: 'endpoint';
|
|
93
|
+
pattern: RegExp;
|
|
94
|
+
params: GetParams;
|
|
95
|
+
load(): Promise<{
|
|
96
|
+
[method: string]: RequestHandler;
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type SSRRoute = SSREndpoint | SSRPage;
|
|
101
|
+
|
|
102
|
+
export type CSRRoute = [RegExp, CSRComponentLoader[], CSRComponentLoader[], GetParams?];
|
|
103
|
+
|
|
104
|
+
export type SSRNodeLoader = () => Promise<SSRNode>;
|
|
105
|
+
|
|
106
|
+
export interface Hooks {
|
|
107
|
+
externalFetch: ExternalFetch;
|
|
108
|
+
getSession: GetSession;
|
|
109
|
+
handle: InternalHandle;
|
|
110
|
+
handleError: HandleError;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface SSRNode {
|
|
114
|
+
module: SSRComponent;
|
|
115
|
+
/** client-side module URL for this component */
|
|
116
|
+
entry: string;
|
|
117
|
+
/** external CSS files */
|
|
118
|
+
css: string[];
|
|
119
|
+
/** external JS files */
|
|
120
|
+
js: string[];
|
|
121
|
+
/** inlined styles */
|
|
122
|
+
styles?: Record<string, string>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface SSRRenderOptions {
|
|
126
|
+
amp: boolean;
|
|
127
|
+
dev: boolean;
|
|
128
|
+
floc: boolean;
|
|
129
|
+
get_stack: (error: Error) => string | undefined;
|
|
130
|
+
handle_error(error: Error & { frame?: string }, request: ServerRequest<any>): void;
|
|
131
|
+
hooks: Hooks;
|
|
132
|
+
hydrate: boolean;
|
|
133
|
+
manifest: SSRManifest;
|
|
134
|
+
method_override: MethodOverride;
|
|
135
|
+
paths: {
|
|
136
|
+
base: string;
|
|
137
|
+
assets: string;
|
|
138
|
+
};
|
|
139
|
+
prefix: string;
|
|
140
|
+
prerender: boolean;
|
|
141
|
+
read(file: string): Buffer;
|
|
142
|
+
root: SSRComponent['default'];
|
|
143
|
+
router: boolean;
|
|
144
|
+
service_worker?: string;
|
|
145
|
+
target: string;
|
|
146
|
+
template({ head, body, assets }: { head: string; body: string; assets: string }): string;
|
|
147
|
+
trailing_slash: TrailingSlash;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface SSRRenderState {
|
|
151
|
+
fetched?: string;
|
|
152
|
+
initiator?: SSRPage | null;
|
|
153
|
+
prerender?: PrerenderOptions;
|
|
154
|
+
fallback?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface Asset {
|
|
158
|
+
file: string;
|
|
159
|
+
size: number;
|
|
160
|
+
type: string | null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface RouteSegment {
|
|
164
|
+
content: string;
|
|
165
|
+
dynamic: boolean;
|
|
166
|
+
rest: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type HttpMethod = 'get' | 'head' | 'post' | 'put' | 'delete' | 'patch';
|
|
170
|
+
|
|
171
|
+
export interface PageData {
|
|
172
|
+
type: 'page';
|
|
173
|
+
segments: RouteSegment[];
|
|
174
|
+
pattern: RegExp;
|
|
175
|
+
params: string[];
|
|
176
|
+
path: string;
|
|
177
|
+
a: string[];
|
|
178
|
+
b: string[];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface EndpointData {
|
|
182
|
+
type: 'endpoint';
|
|
183
|
+
segments: RouteSegment[];
|
|
184
|
+
pattern: RegExp;
|
|
185
|
+
params: string[];
|
|
186
|
+
file: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export type RouteData = PageData | EndpointData;
|
|
190
|
+
|
|
191
|
+
export interface ManifestData {
|
|
192
|
+
assets: Asset[];
|
|
193
|
+
layout: string;
|
|
194
|
+
error: string;
|
|
195
|
+
components: string[];
|
|
196
|
+
routes: RouteData[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface BuildData {
|
|
200
|
+
app_dir: string;
|
|
201
|
+
manifest_data: ManifestData;
|
|
202
|
+
client: {
|
|
203
|
+
assets: OutputAsset[];
|
|
204
|
+
chunks: OutputChunk[];
|
|
205
|
+
entry: {
|
|
206
|
+
file: string;
|
|
207
|
+
js: string[];
|
|
208
|
+
css: string[];
|
|
209
|
+
};
|
|
210
|
+
vite_manifest: import('vite').Manifest;
|
|
211
|
+
};
|
|
212
|
+
server: {
|
|
213
|
+
chunks: OutputChunk[];
|
|
214
|
+
methods: Record<string, HttpMethod[]>;
|
|
215
|
+
vite_manifest: import('vite').Manifest;
|
|
216
|
+
};
|
|
217
|
+
static: string[];
|
|
218
|
+
entries: string[];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type NormalizedLoadOutput = Either<
|
|
222
|
+
{
|
|
223
|
+
status: number;
|
|
224
|
+
error?: Error;
|
|
225
|
+
redirect?: string;
|
|
226
|
+
props?: Record<string, any> | Promise<Record<string, any>>;
|
|
227
|
+
stuff?: Record<string, any>;
|
|
228
|
+
maxage?: number;
|
|
229
|
+
},
|
|
230
|
+
Fallthrough
|
|
231
|
+
>;
|
|
232
|
+
|
|
233
|
+
export type TrailingSlash = 'never' | 'always' | 'ignore';
|
|
234
|
+
export interface MethodOverride {
|
|
235
|
+
parameter: string;
|
|
236
|
+
allowed: string[];
|
|
237
|
+
}
|
package/types/page.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { InferValue, MaybePromise, Rec, Either, Fallthrough } from './helper';
|
|
2
|
+
|
|
3
|
+
export interface LoadInput<
|
|
4
|
+
PageParams extends Rec<string> = Rec<string>,
|
|
5
|
+
Stuff extends Rec = Rec,
|
|
6
|
+
Session = any
|
|
7
|
+
> {
|
|
8
|
+
url: URL;
|
|
9
|
+
params: PageParams;
|
|
10
|
+
fetch(info: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
11
|
+
session: Session;
|
|
12
|
+
stuff: Stuff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ErrorLoadInput<
|
|
16
|
+
PageParams extends Rec<string> = Rec<string>,
|
|
17
|
+
Stuff extends Rec = Rec,
|
|
18
|
+
Session = any
|
|
19
|
+
> extends LoadInput<PageParams, Stuff, Session> {
|
|
20
|
+
status?: number;
|
|
21
|
+
error?: Error;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface LoadOutput<Props extends Rec = Rec, Stuff extends Rec = Rec> {
|
|
25
|
+
status?: number;
|
|
26
|
+
error?: string | Error;
|
|
27
|
+
redirect?: string;
|
|
28
|
+
props?: Props;
|
|
29
|
+
stuff?: Stuff;
|
|
30
|
+
maxage?: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface LoadInputExtends {
|
|
34
|
+
stuff?: Rec;
|
|
35
|
+
pageParams?: Rec<string>;
|
|
36
|
+
session?: any;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface LoadOutputExtends {
|
|
40
|
+
stuff?: Rec;
|
|
41
|
+
props?: Rec;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface Load<
|
|
45
|
+
Input extends LoadInputExtends = Required<LoadInputExtends>,
|
|
46
|
+
Output extends LoadOutputExtends = Required<LoadOutputExtends>
|
|
47
|
+
> {
|
|
48
|
+
(
|
|
49
|
+
input: LoadInput<
|
|
50
|
+
InferValue<Input, 'pageParams', Rec<string>>,
|
|
51
|
+
InferValue<Input, 'stuff', Rec>,
|
|
52
|
+
InferValue<Input, 'session', any>
|
|
53
|
+
>
|
|
54
|
+
): MaybePromise<
|
|
55
|
+
Either<
|
|
56
|
+
LoadOutput<InferValue<Output, 'props', Rec>, InferValue<Output, 'stuff', Rec>>,
|
|
57
|
+
Fallthrough
|
|
58
|
+
>
|
|
59
|
+
>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ErrorLoad<
|
|
63
|
+
Input extends LoadInputExtends = Required<LoadInputExtends>,
|
|
64
|
+
Output extends LoadOutputExtends = Required<LoadOutputExtends>
|
|
65
|
+
> {
|
|
66
|
+
(
|
|
67
|
+
input: ErrorLoadInput<
|
|
68
|
+
InferValue<Input, 'pageParams', Rec<string>>,
|
|
69
|
+
InferValue<Input, 'stuff', Rec>,
|
|
70
|
+
InferValue<Input, 'session', any>
|
|
71
|
+
>
|
|
72
|
+
): MaybePromise<LoadOutput<InferValue<Output, 'props', Rec>, InferValue<Output, 'stuff', Rec>>>;
|
|
73
|
+
}
|