You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The automatically generated types file for routes with a rest parameter are incorrect.
If you create a file called [...foo].svelte and then inspect the [...foo].d.ts file that gets generated, you'll see that the code isn't valid:
// this file is auto-generatedimporttype{LoadasGenericLoad}from'@sveltejs/kit';exporttypeLoad<Props=Record<string,any>>=GenericLoad<{ ...foo: string},Props>;
If the ... in front of foo in GenericLoad is removed, the generated code would be valid and correct.
Reproduction
Just create a file called [...foo].svelte in any project. It doesn't need to have any contents.
Describe the bug
The automatically generated types file for routes with a rest parameter are incorrect.
If you create a file called
[...foo].svelte
and then inspect the[...foo].d.ts
file that gets generated, you'll see that the code isn't valid:If the
...
in front offoo
inGenericLoad
is removed, the generated code would be valid and correct.Reproduction
Just create a file called
[...foo].svelte
in any project. It doesn't need to have any contents.System Info
Severity
annoyance+ (it's a compilation error that might break builds in some environments)
The text was updated successfully, but these errors were encountered: