Open revers3ntropy opened 1 year ago
Is this relevent to my error?
Argument of type '{ "on:filedrop": (e: CustomEvent<FileDropSelectEvent>) => void; class: string; }' is not assignable to parameter of type 'Omit<HTMLAttributes<HTMLDivElement>, never> & HTMLAttributes<any>'.
Object literal may only specify known properties, and '"on:filedrop"' does not exist in type 'Omit<HTMLAttributes<HTMLDivElement>, never> & HTMLAttributes<any>'.ts(2345)
I have added your declaration to my global.d.ts file, and it does remove my type error. Thanks!
No problem! Hopefully someone can update it soon, if other people are having the same issue...
Does this need to be changed within the package? Sorry, I haven't been following svelte lately.
I'm not really sure what you mean, but I think it's just the README that needs updating..?
Will do, thanks!
I wasn't sure if src/global.d.ts was interfering and causing issues.
svelte-check
will throw an error at the moment if you try to use events with dom elements with Svelte 4, I think the typescript declaration now needs to look more like this:(
svelteHTML
namespace instead of 'svelte.JSX' and 'on:event' instead of 'onevent', this seems to work for me)