-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
Description
Describe the bug
If you try to do on:formdata={formDataEventHandler} on a form, it works, but TypeScript yells at you, being apparently unaware such an event exists.
The error is
Argument of type '{ action: string; "on:formdata": (evt: any) => void; }' is not assignable to parameter of type 'HTMLProps<"form", HTMLAttributes>'.
Object literal may only specify known properties, and '"on:formdata"' does not exist in type 'HTMLProps<"form", HTMLAttributes>'
What makes this especially irksome is that there doesn't appear to be any way to @ts-ignore TS errors in markup, though if anyone knows how, I'd love to learn
Reproduction
Grab a TypeScript module, and do
<form action="/books" on:formdata={onFormData}>
and then look at the error
Logs
N/ASystem Info
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 271.92 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.11.1 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.11.1/bin/node
Yarn: 1.22.17 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.11.1/bin/yarn
npm: 8.18.0 - ~/Documents/node_modules/.bin/npm
Browsers:
Chrome: 108.0.5359.94
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.89
@sveltejs/kit: ^1.0.0-next.570 => 1.0.0-next.570
svelte: ^3.44.0 => 3.53.1
vite: ^3.1.0 => 3.2.4Severity
annoyance
Additional Information
No response
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working