-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Description
Describe the bug
It looks like fromAction doesn't know that svelte-dnd-action added onconsider and onfinalize events to the element.
To be clear, everything still works, it's just TypeScript/svelte-check is screaming that onconsider and onfinialize doesn't exist
(This issue is non-existent if I just use the action as-is with use:, as in, TS/Svelte doesn't scream that onconsider and onfinialize doesn't exist)
Reproduction
https://www.sveltelab.dev/391b6oi0q1zn0ke
Logs
❯ npx svelte-check
Loading svelte-check in workspace: /home/qo5ip4we0aj4vrkeetv8swp3pbyxe1-fmt4
Getting Svelte diagnostics...
/home/qo5ip4we0aj4vrkeetv8swp3pbyxe1-fmt4/src/routes/+page.svelte:22:2
Error: Object literal may only specify known properties, and '"onconsider"' does not exist in type 'HTMLProps<"section", HTMLAttributes<any>>'. (ts)
{@attach fromAction(dndzone, () => ({ items, flipDurationMs }))}
onconsider={handleDndConsider}
onfinalize={handleDndFinalize}
====================================
svelte-check found 1 error and 0 warnings in 1 fileSystem Info
❯ npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
svelte: ^5 => 5.36.7Severity
annoyance