-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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:
declare type FileDropEvent = import('filedrop-svelte/event').FileDropEvent;
declare type FileDropSelectEvent = import('filedrop-svelte/event').FileDropSelectEvent;
declare type FileDropDragEvent = import('filedrop-svelte/event').FileDropDragEvent;
declare namespace svelteHTML {
interface HTMLAttributes<T> {
'on:filedrop'?: (
event: CustomEvent<FileDropSelectEvent> & {
target: EventTarget & T;
}
) => void;
// etc
}
}
(svelteHTML
namespace instead of 'svelte.JSX' and 'on:event' instead of 'onevent', this seems to work for me)
pdaddyojrhager84, chanced and multiplehats
Metadata
Metadata
Assignees
Labels
No labels