When using the on:init event with TypeScript, the following error shows:
Argument of type '{ class: string; "on:init": (event: CustomEvent<EmblaCarouselType>) => void; }' is not assignable to parameter of type 'Omit<Omit<HTMLAttributes<HTMLDivElement>
The problem can be solved by adding the following to a d.ts file:
Bug is related to
Embla Carousel version
Describe the bug
on:init
event with TypeScript, the following error shows:The problem can be solved by adding the following to a
d.ts
file:...which is very hacky and not desired.
Expected behavior
ActionReturn<Parameter, Attributes>
so the tooling picks up the correct types.