Skip to content

Commit fc16ed3

Browse files
authored
Fix wrong LayoutServerLoad.name type (#6123)
* fix typos * add changeset
1 parent ed013a9 commit fc16ed3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/tidy-mice-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
Fix typos in generating `LayoutServerLoad.{name}` type

packages/kit/src/core/sync/write_types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ function write_types_for_dir(config, manifest_data, routes_dir, dir, groups, ts)
363363
}
364364
if (server_load) {
365365
server_load_exports.push(
366-
`export type ${name}<OutputData extends Record<string, any> | void = Record<string, any> | void> = ${load};`
366+
`export type ${name}<OutputData extends Record<string, any> | void = Record<string, any> | void> = ${server_load};`
367367
);
368368
server_load_event_exports.push(
369369
`export type ${name} = Parameters<LayoutServerLoad.${name}>[0];`

0 commit comments

Comments
 (0)