@sveltejs/kit 1.0.0-next.447 → 1.0.0-next.448
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/package.json +4 -5
- package/src/runtime/server/page/render.js +0 -9
- package/types/internal.d.ts +0 -1
- package/src/core/sync/write_types/test/layout/+layout.js +0 -5
- package/src/core/sync/write_types/test/layout/+layout.server.js +0 -5
- package/src/core/sync/write_types/test/layout/+layout.svelte +0 -0
- package/src/core/sync/write_types/test/layout/+page.js +0 -5
- package/src/core/sync/write_types/test/layout/+page.server.js +0 -5
- package/src/core/sync/write_types/test/layout/+page.svelte +0 -0
- package/src/core/sync/write_types/test/layout/_expected/$types.d.ts +0 -67
- package/src/core/sync/write_types/test/layout-advanced/(main)/+layout.server.js +0 -5
- package/src/core/sync/write_types/test/layout-advanced/(main)/+layout.svelte +0 -0
- package/src/core/sync/write_types/test/layout-advanced/(main)/+page.js +0 -5
- package/src/core/sync/write_types/test/layout-advanced/(main)/+page@.svelte +0 -0
- package/src/core/sync/write_types/test/layout-advanced/(main)/sub/+page.js +0 -5
- package/src/core/sync/write_types/test/layout-advanced/(main)/sub/+page.svelte +0 -0
- package/src/core/sync/write_types/test/layout-advanced/+layout.js +0 -5
- package/src/core/sync/write_types/test/layout-advanced/+layout.svelte +0 -0
- package/src/core/sync/write_types/test/layout-advanced/_expected/$types.d.ts +0 -32
- package/src/core/sync/write_types/test/layout-advanced/_expected/(main)/$types.d.ts +0 -42
- package/src/core/sync/write_types/test/layout-advanced/_expected/(main)/sub/$types.d.ts +0 -33
- package/src/core/sync/write_types/test/simple-page-server-and-shared/+page.js +0 -5
- package/src/core/sync/write_types/test/simple-page-server-and-shared/+page.server.js +0 -5
- package/src/core/sync/write_types/test/simple-page-server-and-shared/+page.svelte +0 -0
- package/src/core/sync/write_types/test/simple-page-server-and-shared/_expected/$types.d.ts +0 -44
- package/src/core/sync/write_types/test/simple-page-server-only/+page.server.js +0 -5
- package/src/core/sync/write_types/test/simple-page-server-only/+page.svelte +0 -0
- package/src/core/sync/write_types/test/simple-page-server-only/_expected/$types.d.ts +0 -30
- package/src/core/sync/write_types/test/simple-page-shared-only/+page.js +0 -5
- package/src/core/sync/write_types/test/simple-page-shared-only/+page.svelte +0 -0
- package/src/core/sync/write_types/test/simple-page-shared-only/_expected/$types.d.ts +0 -33
- package/src/core/sync/write_types/test/slugs/+layout.js +0 -1
- package/src/core/sync/write_types/test/slugs/+layout.svelte +0 -1
- package/src/core/sync/write_types/test/slugs/[...rest]/+page.js +0 -3
- package/src/core/sync/write_types/test/slugs/[...rest]/+page.svelte +0 -0
- package/src/core/sync/write_types/test/slugs/[slug]/+page.js +0 -3
- package/src/core/sync/write_types/test/slugs/[slug]/+page.svelte +0 -0
- package/src/core/sync/write_types/test/slugs/_expected/$types.d.ts +0 -32
- package/src/core/sync/write_types/test/slugs/_expected/[...rest]/$types.d.ts +0 -29
- package/src/core/sync/write_types/test/slugs/_expected/[slug]/$types.d.ts +0 -29
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/+layout.js +0 -1
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/+layout.svelte +0 -1
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/_expected/$types.d.ts +0 -30
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/_expected/nested/$types.d.ts +0 -32
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/_expected/nested/[...rest]/$types.d.ts +0 -37
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/_expected/nested/[slug]/$types.d.ts +0 -17
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/+layout.js +0 -1
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/+layout.svelte +0 -1
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/[...rest]/+page.js +0 -3
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/[...rest]/+page.svelte +0 -0
- package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/[slug]/+page@.svelte +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.448",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -50,9 +50,8 @@
|
|
|
50
50
|
"files": [
|
|
51
51
|
"src",
|
|
52
52
|
"!src/**/*.spec.js",
|
|
53
|
-
"!src/packaging/test",
|
|
54
53
|
"!src/core/**/fixtures",
|
|
55
|
-
"!src/core
|
|
54
|
+
"!src/core/**/test",
|
|
56
55
|
"types",
|
|
57
56
|
"svelte-kit.js"
|
|
58
57
|
],
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
},
|
|
78
77
|
"types": "types/index.d.ts",
|
|
79
78
|
"engines": {
|
|
80
|
-
"node": ">=16.
|
|
79
|
+
"node": ">=16.14"
|
|
81
80
|
},
|
|
82
81
|
"scripts": {
|
|
83
82
|
"build": "npm run types",
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
"format": "npm run lint -- --write",
|
|
88
87
|
"test": "npm run test:unit && npm run test:integration",
|
|
89
88
|
"test:integration": "pnpm run -r --workspace-concurrency 1 --filter=\"./test/**\" test",
|
|
90
|
-
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\"
|
|
89
|
+
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\"",
|
|
91
90
|
"types": "node scripts/extract-types.js",
|
|
92
91
|
"postinstall": "node svelte-kit.js sync"
|
|
93
92
|
}
|
|
@@ -299,15 +299,6 @@ export async function render_response({
|
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
if (branch.some((node) => node.server_data)) {
|
|
303
|
-
serialized_data.push(
|
|
304
|
-
render_json_payload_script(
|
|
305
|
-
{ type: 'server_data' },
|
|
306
|
-
branch.map(({ server_data }) => server_data)
|
|
307
|
-
)
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
302
|
if (validation_errors) {
|
|
312
303
|
serialized_data.push(
|
|
313
304
|
render_json_payload_script({ type: 'validation_errors' }, validation_errors)
|
package/types/internal.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageServerParentData = EnsureParentData<LayoutServerData>;
|
|
15
|
-
type PageParentData = EnsureParentData<LayoutData>;
|
|
16
|
-
type LayoutParams = RouteParams & {};
|
|
17
|
-
type LayoutServerParentData = EnsureParentData<{}>;
|
|
18
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
19
|
-
|
|
20
|
-
export type PageServerLoad<
|
|
21
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
22
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
23
|
-
| void
|
|
24
|
-
> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData>;
|
|
25
|
-
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
26
|
-
export type Errors = null;
|
|
27
|
-
export type PageServerData = Kit.AwaitedProperties<
|
|
28
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.server.js').load>>
|
|
29
|
-
>;
|
|
30
|
-
export type PageLoad<
|
|
31
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
32
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
33
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
34
|
-
export type PageData = Omit<
|
|
35
|
-
PageParentData,
|
|
36
|
-
keyof Kit.AwaitedProperties<
|
|
37
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
38
|
-
>
|
|
39
|
-
> &
|
|
40
|
-
Kit.AwaitedProperties<
|
|
41
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
42
|
-
>;
|
|
43
|
-
export type Action = Kit.Action<RouteParams>;
|
|
44
|
-
export type LayoutServerLoad<
|
|
45
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
46
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
47
|
-
| void
|
|
48
|
-
> = Kit.ServerLoad<LayoutParams, LayoutServerParentData, OutputData>;
|
|
49
|
-
export type LayoutServerLoadEvent = Parameters<LayoutServerLoad>[0];
|
|
50
|
-
export type LayoutServerData = Kit.AwaitedProperties<
|
|
51
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.server.js').load>>
|
|
52
|
-
>;
|
|
53
|
-
export type LayoutLoad<
|
|
54
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
55
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
56
|
-
| void
|
|
57
|
-
> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData>;
|
|
58
|
-
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
59
|
-
export type LayoutData = Omit<
|
|
60
|
-
LayoutParentData,
|
|
61
|
-
keyof Kit.AwaitedProperties<
|
|
62
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
63
|
-
>
|
|
64
|
-
> &
|
|
65
|
-
Kit.AwaitedProperties<
|
|
66
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
67
|
-
>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type LayoutParams = RouteParams & {};
|
|
15
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
16
|
-
|
|
17
|
-
export type LayoutServerData = null;
|
|
18
|
-
export type LayoutLoad<
|
|
19
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
20
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
21
|
-
| void
|
|
22
|
-
> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData>;
|
|
23
|
-
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
24
|
-
export type LayoutData = Omit<
|
|
25
|
-
LayoutParentData,
|
|
26
|
-
keyof Kit.AwaitedProperties<
|
|
27
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
28
|
-
>
|
|
29
|
-
> &
|
|
30
|
-
Kit.AwaitedProperties<
|
|
31
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
32
|
-
>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;
|
|
15
|
-
type LayoutParams = RouteParams & {};
|
|
16
|
-
type LayoutServerParentData = EnsureParentData<import('../$types.js').LayoutServerData>;
|
|
17
|
-
type LayoutParentData = EnsureParentData<import('../$types.js').LayoutData>;
|
|
18
|
-
|
|
19
|
-
export type PageServerData = null;
|
|
20
|
-
export type PageLoad<
|
|
21
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
22
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
23
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
24
|
-
export type PageData = Omit<
|
|
25
|
-
PageParentData,
|
|
26
|
-
keyof Kit.AwaitedProperties<
|
|
27
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../(main)/+page.js').load>>
|
|
28
|
-
>
|
|
29
|
-
> &
|
|
30
|
-
Kit.AwaitedProperties<
|
|
31
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../(main)/+page.js').load>>
|
|
32
|
-
>;
|
|
33
|
-
export type LayoutServerLoad<
|
|
34
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
35
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
36
|
-
| void
|
|
37
|
-
> = Kit.ServerLoad<LayoutParams, LayoutServerParentData, OutputData>;
|
|
38
|
-
export type LayoutServerLoadEvent = Parameters<LayoutServerLoad>[0];
|
|
39
|
-
export type LayoutServerData = Kit.AwaitedProperties<
|
|
40
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../(main)/+layout.server.js').load>>
|
|
41
|
-
>;
|
|
42
|
-
export type LayoutData = Omit<LayoutParentData, keyof LayoutServerData> & LayoutServerData;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = Omit<
|
|
15
|
-
EnsureParentData<import('../../$types.js').LayoutData>,
|
|
16
|
-
keyof import('../$types.js').LayoutData
|
|
17
|
-
> &
|
|
18
|
-
EnsureParentData<import('../$types.js').LayoutData>;
|
|
19
|
-
|
|
20
|
-
export type PageServerData = null;
|
|
21
|
-
export type PageLoad<
|
|
22
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
23
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
24
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
25
|
-
export type PageData = Omit<
|
|
26
|
-
PageParentData,
|
|
27
|
-
keyof Kit.AwaitedProperties<
|
|
28
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../../(main)/sub/+page.js').load>>
|
|
29
|
-
>
|
|
30
|
-
> &
|
|
31
|
-
Kit.AwaitedProperties<
|
|
32
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../../(main)/sub/+page.js').load>>
|
|
33
|
-
>;
|
|
File without changes
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageServerParentData = EnsureParentData<LayoutServerData>;
|
|
15
|
-
type PageParentData = EnsureParentData<LayoutData>;
|
|
16
|
-
type LayoutParams = RouteParams & {};
|
|
17
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
18
|
-
|
|
19
|
-
export type PageServerLoad<
|
|
20
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
21
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
22
|
-
| void
|
|
23
|
-
> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData>;
|
|
24
|
-
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
25
|
-
export type Errors = null;
|
|
26
|
-
export type PageServerData = Kit.AwaitedProperties<
|
|
27
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.server.js').load>>
|
|
28
|
-
>;
|
|
29
|
-
export type PageLoad<
|
|
30
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
31
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
32
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
33
|
-
export type PageData = Omit<
|
|
34
|
-
PageParentData,
|
|
35
|
-
keyof Kit.AwaitedProperties<
|
|
36
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
37
|
-
>
|
|
38
|
-
> &
|
|
39
|
-
Kit.AwaitedProperties<
|
|
40
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
41
|
-
>;
|
|
42
|
-
export type Action = Kit.Action<RouteParams>;
|
|
43
|
-
export type LayoutServerData = null;
|
|
44
|
-
export type LayoutData = LayoutParentData;
|
|
File without changes
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageServerParentData = EnsureParentData<LayoutServerData>;
|
|
15
|
-
type PageParentData = EnsureParentData<LayoutData>;
|
|
16
|
-
type LayoutParams = RouteParams & {};
|
|
17
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
18
|
-
|
|
19
|
-
export type PageServerLoad<
|
|
20
|
-
OutputData extends OutputDataShape<PageServerParentData> = OutputDataShape<PageServerParentData>
|
|
21
|
-
> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData>;
|
|
22
|
-
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
23
|
-
export type Errors = null;
|
|
24
|
-
export type PageServerData = Kit.AwaitedProperties<
|
|
25
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.server.js').load>>
|
|
26
|
-
>;
|
|
27
|
-
export type PageData = Omit<PageParentData, keyof PageServerData> & PageServerData;
|
|
28
|
-
export type Action = Kit.Action<RouteParams>;
|
|
29
|
-
export type LayoutServerData = null;
|
|
30
|
-
export type LayoutData = LayoutParentData;
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = EnsureParentData<LayoutData>;
|
|
15
|
-
type LayoutParams = RouteParams & {};
|
|
16
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
17
|
-
|
|
18
|
-
export type PageServerData = null;
|
|
19
|
-
export type PageLoad<
|
|
20
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
21
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
22
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
23
|
-
export type PageData = Omit<
|
|
24
|
-
PageParentData,
|
|
25
|
-
keyof Kit.AwaitedProperties<
|
|
26
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
27
|
-
>
|
|
28
|
-
> &
|
|
29
|
-
Kit.AwaitedProperties<
|
|
30
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+page.js').load>>
|
|
31
|
-
>;
|
|
32
|
-
export type LayoutServerData = null;
|
|
33
|
-
export type LayoutData = LayoutParentData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type LayoutParams = RouteParams & { rest?: string; slug?: string };
|
|
15
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
16
|
-
|
|
17
|
-
export type LayoutServerData = null;
|
|
18
|
-
export type LayoutLoad<
|
|
19
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
20
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
21
|
-
| void
|
|
22
|
-
> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData>;
|
|
23
|
-
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
24
|
-
export type LayoutData = Omit<
|
|
25
|
-
LayoutParentData,
|
|
26
|
-
keyof Kit.AwaitedProperties<
|
|
27
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
28
|
-
>
|
|
29
|
-
> &
|
|
30
|
-
Kit.AwaitedProperties<
|
|
31
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
32
|
-
>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = { rest: string };
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;
|
|
15
|
-
|
|
16
|
-
export type PageServerData = null;
|
|
17
|
-
export type PageLoad<
|
|
18
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
19
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
20
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
21
|
-
export type PageData = Omit<
|
|
22
|
-
PageParentData,
|
|
23
|
-
keyof Kit.AwaitedProperties<
|
|
24
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../[...rest]/+page.js').load>>
|
|
25
|
-
>
|
|
26
|
-
> &
|
|
27
|
-
Kit.AwaitedProperties<
|
|
28
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../[...rest]/+page.js').load>>
|
|
29
|
-
>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = { slug: string };
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;
|
|
15
|
-
|
|
16
|
-
export type PageServerData = null;
|
|
17
|
-
export type PageLoad<
|
|
18
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
19
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
20
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
21
|
-
export type PageData = Omit<
|
|
22
|
-
PageParentData,
|
|
23
|
-
keyof Kit.AwaitedProperties<
|
|
24
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../[slug]/+page.js').load>>
|
|
25
|
-
>
|
|
26
|
-
> &
|
|
27
|
-
Kit.AwaitedProperties<
|
|
28
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../[slug]/+page.js').load>>
|
|
29
|
-
>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/_expected/$types.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type LayoutParams = RouteParams & { rest?: string; slug?: string };
|
|
15
|
-
type LayoutParentData = EnsureParentData<{}>;
|
|
16
|
-
|
|
17
|
-
export type LayoutServerData = null;
|
|
18
|
-
export type LayoutLoad<
|
|
19
|
-
OutputData extends OutputDataShape<LayoutParentData> = OutputDataShape<LayoutParentData>
|
|
20
|
-
> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData>;
|
|
21
|
-
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
22
|
-
export type LayoutData = Omit<
|
|
23
|
-
LayoutParentData,
|
|
24
|
-
keyof Kit.AwaitedProperties<
|
|
25
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
26
|
-
>
|
|
27
|
-
> &
|
|
28
|
-
Kit.AwaitedProperties<
|
|
29
|
-
Awaited<ReturnType<typeof import('../../../../../../../../+layout.js').load>>
|
|
30
|
-
>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = {};
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type LayoutParams = RouteParams & { rest?: string };
|
|
15
|
-
type LayoutParentData = EnsureParentData<import('../$types.js').LayoutData>;
|
|
16
|
-
|
|
17
|
-
export type LayoutServerData = null;
|
|
18
|
-
export type LayoutLoad<
|
|
19
|
-
OutputData extends (Partial<App.PageData> & Record<string, any>) | void =
|
|
20
|
-
| (Partial<App.PageData> & Record<string, any>)
|
|
21
|
-
| void
|
|
22
|
-
> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData>;
|
|
23
|
-
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
24
|
-
export type LayoutData = Omit<
|
|
25
|
-
LayoutParentData,
|
|
26
|
-
keyof Kit.AwaitedProperties<
|
|
27
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../nested/+layout.js').load>>
|
|
28
|
-
>
|
|
29
|
-
> &
|
|
30
|
-
Kit.AwaitedProperties<
|
|
31
|
-
Awaited<ReturnType<typeof import('../../../../../../../../../nested/+layout.js').load>>
|
|
32
|
-
>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = { rest: string };
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = Omit<
|
|
15
|
-
EnsureParentData<import('../../$types.js').LayoutData>,
|
|
16
|
-
keyof import('../$types.js').LayoutData
|
|
17
|
-
> &
|
|
18
|
-
EnsureParentData<import('../$types.js').LayoutData>;
|
|
19
|
-
|
|
20
|
-
export type PageServerData = null;
|
|
21
|
-
export type PageLoad<
|
|
22
|
-
OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>
|
|
23
|
-
> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData>;
|
|
24
|
-
export type PageLoadEvent = Parameters<PageLoad>[0];
|
|
25
|
-
export type PageData = Omit<
|
|
26
|
-
PageParentData,
|
|
27
|
-
keyof Kit.AwaitedProperties<
|
|
28
|
-
Awaited<
|
|
29
|
-
ReturnType<typeof import('../../../../../../../../../../nested/[...rest]/+page.js').load>
|
|
30
|
-
>
|
|
31
|
-
>
|
|
32
|
-
> &
|
|
33
|
-
Kit.AwaitedProperties<
|
|
34
|
-
Awaited<
|
|
35
|
-
ReturnType<typeof import('../../../../../../../../../../nested/[...rest]/+page.js').load>
|
|
36
|
-
>
|
|
37
|
-
>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type * as Kit from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
type RouteParams = { slug: string };
|
|
4
|
-
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
5
|
-
export type RequiredKeys<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K;
|
|
7
|
-
}[keyof T];
|
|
8
|
-
type OutputDataShape<T> = MaybeWithVoid<
|
|
9
|
-
Omit<App.PageData, RequiredKeys<T>> &
|
|
10
|
-
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
|
|
11
|
-
Record<string, any>
|
|
12
|
-
>;
|
|
13
|
-
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
|
|
14
|
-
type PageParentData = EnsureParentData<import('../../$types.js').LayoutData>;
|
|
15
|
-
|
|
16
|
-
export type PageServerData = null;
|
|
17
|
-
export type PageData = PageParentData;
|
package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/+layout.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
package/src/core/sync/write_types/test/slugs-layout-not-all-pages-have-load/nested/+layout.svelte
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load() {}
|
|
File without changes
|
|
File without changes
|