-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Describe the bug
When defining an Action with explicit parameter types, the compiler still infers the parameters as any, leading to type errors when accessing properties:
But this seems to happen only in the IDE because when running svelte-check there are no errors.
Reproduction
https://github.com/colinlienard/svelte-5-repro in src/App.svelte
Logs
Property 'foo' does not exist on type 'unknown'System Info
System:
OS: macOS 14.6.1
CPU: (8) arm64 Apple M2
Memory: 505.70 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v20.11.0/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
pnpm: 9.0.6 - ~/.nvm/versions/node/v20.11.0/bin/pnpm
bun: 1.1.26 - ~/.nvm/versions/node/v20.11.0/bin/bun
Browsers:
Chrome: 128.0.6613.138
Safari: 17.6
npmPackages:
svelte: 5.0.0-next.246 => 5.0.0-next.246Severity
annoyance
olivermrose, denovodavid, hmnd, ChristopheCorbalan, craig-jennings and 1 more
