@@ -68,24 +68,24 @@ export interface BuildData {
68
68
out_dir : string ;
69
69
service_worker : string | null ;
70
70
client : {
71
- /** Path to the client entry point */
71
+ /** Path to the client entry point. */
72
72
start : string ;
73
- /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'` */
73
+ /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'`. */
74
74
app ?: string ;
75
- /** JS files that the client entry point relies on */
75
+ /** JS files that the client entry point relies on. */
76
76
imports : string [ ] ;
77
77
/**
78
78
* JS files that represent the entry points of the layouts/pages.
79
79
* An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file).
80
80
* Only set in case of `router.resolution === 'server'`.
81
81
*/
82
- nodes ?: ( string | undefined ) [ ] ;
82
+ nodes ?: Array < string | undefined > ;
83
83
/**
84
84
* CSS files referenced in the entry points of the layouts/pages.
85
85
* An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file) or if has no CSS.
86
86
* Only set in case of `router.resolution === 'server'`.
87
87
*/
88
- css ?: ( string [ ] | undefined ) [ ] ;
88
+ css ?: Array < string [ ] | undefined > ;
89
89
/**
90
90
* Contains the client route manifest in a form suitable for the server which is used for server side route resolution.
91
91
* Notably, it contains all routes, regardless of whether they are prerendered or not (those are missing in the optimized server route manifest).
@@ -95,7 +95,7 @@ export interface BuildData {
95
95
stylesheets : string [ ] ;
96
96
fonts : string [ ] ;
97
97
uses_env_dynamic_public : boolean ;
98
- /** Only set in case of `bundleStrategy === 'inline'` */
98
+ /** Only set in case of `bundleStrategy === 'inline'`. */
99
99
inline ?: {
100
100
script : string ;
101
101
style : string | undefined ;
@@ -172,15 +172,15 @@ export class InternalServer extends Server {
172
172
options : RequestOptions & {
173
173
prerendering ?: PrerenderOptions ;
174
174
read : ( file : string ) => Buffer ;
175
- /** A hook called before `handle` during dev, so that `AsyncLocalStorage` can be populated */
175
+ /** A hook called before `handle` during dev, so that `AsyncLocalStorage` can be populated. */
176
176
before_handle ?: ( event : RequestEvent , config : any , prerender : PrerenderOption ) => void ;
177
177
emulator ?: Emulator ;
178
178
}
179
179
) : Promise < Response > ;
180
180
}
181
181
182
182
export interface ManifestData {
183
- /** Static files from `kit.config.files.assets` */
183
+ /** Static files from `kit.config.files.assets`. */
184
184
assets : Asset [ ] ;
185
185
hooks : {
186
186
client : string | null ;
@@ -194,15 +194,15 @@ export interface ManifestData {
194
194
195
195
export interface PageNode {
196
196
depth : number ;
197
- /** The +page/layout.svelte */
197
+ /** The ` +page/layout.svelte`. */
198
198
component ?: string ; // TODO supply default component if it's missing (bit of an edge case)
199
- /** The +page/layout.js/.ts */
199
+ /** The ` +page/layout.js/.ts`. */
200
200
universal ?: string ;
201
- /** The +page/layout.server.js/ts */
201
+ /** The ` +page/layout.server.js/ts`. */
202
202
server ?: string ;
203
203
parent_id ?: string ;
204
204
parent ?: PageNode ;
205
- /** Filled with the pages that reference this layout (if this is a layout) */
205
+ /** Filled with the pages that reference this layout (if this is a layout). */
206
206
child_pages ?: PageNode [ ] ;
207
207
}
208
208
@@ -220,6 +220,7 @@ export interface PrerenderOptions {
220
220
export type RecursiveRequired < T > = {
221
221
// Recursive implementation of TypeScript's Required utility type.
222
222
// Will recursively continue until it reaches a primitive or Function
223
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
223
224
[ K in keyof T ] -?: Extract < T [ K ] , Function > extends never // If it does not have a Function type
224
225
? RecursiveRequired < T [ K ] > // recursively continue through.
225
226
: T [ K ] ; // Use the exact type for everything else
@@ -306,20 +307,20 @@ export interface ServerDataChunkNode {
306
307
307
308
/**
308
309
* Signals that the server `load` function was not run, and the
309
- * client should use what it has in memory
310
+ * client should use what it has in memory.
310
311
*/
311
312
export interface ServerDataSkippedNode {
312
313
type : 'skip' ;
313
314
}
314
315
315
316
/**
316
- * Signals that the server `load` function failed
317
+ * Signals that the server `load` function failed.
317
318
*/
318
319
export interface ServerErrorNode {
319
320
type : 'error' ;
320
321
error : App . Error ;
321
322
/**
322
- * Only set for HttpErrors
323
+ * Only set for HttpErrors.
323
324
*/
324
325
status ?: number ;
325
326
}
@@ -339,7 +340,7 @@ export interface ServerMetadataRoute {
339
340
340
341
export interface ServerMetadata {
341
342
nodes : Array < {
342
- /** Also `true` when using `trailingSlash`, because we need to do a server request in that case to get its value */
343
+ /** Also `true` when using `trailingSlash`, because we need to do a server request in that case to get its value. */
343
344
has_server_load : boolean ;
344
345
} > ;
345
346
routes : Map < string , ServerMetadataRoute > ;
@@ -365,15 +366,15 @@ export type SSRComponentLoader = () => Promise<SSRComponent>;
365
366
366
367
export interface SSRNode {
367
368
component : SSRComponentLoader ;
368
- /** index into the `nodes` array in the generated `client/app.js` */
369
+ /** index into the `nodes` array in the generated `client/app.js`. */
369
370
index : number ;
370
371
/** external JS files that are loaded on the client. `imports[0]` is the entry point (e.g. `client/nodes/0.js`) */
371
372
imports : string [ ] ;
372
373
/** external CSS files that are loaded on the client */
373
374
stylesheets : string [ ] ;
374
375
/** external font files that are loaded on the client */
375
376
fonts : string [ ] ;
376
- /** inlined styles */
377
+ /** inlined styles. */
377
378
inline_styles ?( ) : MaybePromise < Record < string , string > > ;
378
379
379
380
universal : {
@@ -466,18 +467,18 @@ export interface SSRState {
466
467
fallback ?: string ;
467
468
getClientAddress ( ) : string ;
468
469
/**
469
- * True if we're currently attempting to render an error page
470
+ * True if we're currently attempting to render an error page.
470
471
*/
471
472
error : boolean ;
472
473
/**
473
- * Allows us to prevent `event.fetch` from making infinitely looping internal requests
474
+ * Allows us to prevent `event.fetch` from making infinitely looping internal requests.
474
475
*/
475
476
depth : number ;
476
477
platform ?: any ;
477
478
prerendering ?: PrerenderOptions ;
478
479
/**
479
480
* When fetching data from a +server.js endpoint in `load`, the page's
480
- * prerender option is inherited by the endpoint, unless overridden
481
+ * prerender option is inherited by the endpoint, unless overridden.
481
482
*/
482
483
prerender_default ?: PrerenderOption ;
483
484
read ?: ( file : string ) => Buffer ;
0 commit comments