Closed rushirufu closed 3 months ago
Hello,
This is "normal" because onaccept
is not a valid event, but a custom one generated by @imask/svelte.
Open your app.d.ts and add this to declare the event on <input>
:
declare module 'svelte/elements' {
export interface HTMLInputAttributes {
// Svelte 4
'on:accept'?: FormEventHandler<HTMLInputElement> | undefined | null;
// Svelte 5
onaccept?: FormEventHandler<T> | undefined | null;
}
}
As @/adiguba mentioned. This error is because the event is not a standard event. You can either enhance the type or ask the author to adjust the type definition following this doc
Describe the bug
Object literal may only specify known properties, and '"on:accept"' does not exist in type 'Omit<HTMLInputAttributes, keyof HTMLAttributes> & HTMLAttributes'.
Reproduction
Severity
annoyance