-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated ActionData type from './$types' is always unknown #6631
Comments
I opened a discussion recently for #6597 which is interesting because it seems it's the same problem but now moved to |
I think it's worth noting, that doing the same thing in a JS project, will work as expected. I've included both TS and a JS sample in #6668. |
It's there any update on this? Do you need more input or better repos? |
Thanks for the fix! The development experience when the types work is amazing 😍 |
Describe the bug
I tried to migrate my project to the newest sveltekit version but the ActionData type imported from './$types' is always unknown.
I then tried to reproduce the issue by creating a new project from scratch and the result is the same. I edited +page.svelte and added a +page.server.ts as follows.
+page.svelte
+page.server.ts
The error at the script tag complains another error, still I am not sure if that is related.
Reproduction
Git Repository
https://github.com/harrylaulau/sveltekittest
Steps
created with:
npm create svelte@latest test
Options: skeleton project, typescript, eslint, prttier enabled.
Edited Files:
src/routes/+page.svelte
src/routes/+page.server.ts
Logs
console.log successfully output true when the form button is pressed
System Info
Severity
serious, but I can work around it
Additional Information
This is from the generated
$types.d.ts
file. Not sure if this screen shot is helpful.The text was updated successfully, but these errors were encountered: