-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Describe the bug
This seems to be only a problem whenever you are using form actions with multiple named actions.
If you have multiple actions that return different objects, you will get "Property 'x' does not exist on type" errors from typescript.
This is a bit annoying since you then have to define your own types instead of using SvelteKit generated types.
(I'm not sure if this is a bug or intended)
Related ?:
- some properties in type of object returned from ActionData is missing #6823
- Missing property in type from ActionData #7004
Reproduction
https://github.com/madupuis90/form-actions-type-github
This is the simply a create svelte app using the form action examples from the docs (with implemented register function instead of commented)
If you look in +page.svelte you will see the invalid types. Commenting the register action clears the errors.
Logs
No response
System Info
System:
OS: Linux 5.10 Ubuntu 20.04.5 LTS (Focal Fossa)
CPU: (6) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
Memory: 46.58 GB / 50.16 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 19.2.0 - ~/.nvm/versions/node/v19.2.0/bin/node
npm: 9.2.0 - ~/.nvm/versions/node/v19.2.0/bin/npm
npmPackages:
@sveltejs/adapter-auto: ^1.0.0 => 1.0.2
@sveltejs/kit: ^1.0.0 => 1.3.10
svelte: ^3.54.0 => 3.55.1
vite: ^4.0.0 => 4.1.1Severity
annoyance
Additional Information
No response