Closed jrmajor closed 1 month ago
Before types were added to Svelte adapter, I used the following signature:
export const inertia: Action<
HTMLAnchorElement | HTMLButtonElement,
(VisitOptions & { href?: string }) | undefined
>;
Thanks for reporting this @jrmajor! I can confirm that commit 69292ef fixes the type error you ran into. Here's the new signature:
inertia(node: ActionElement, options?: ActionParameters): ActionReturn<ActionParameters, ActionAttributes>
While looking into this type error, I noticed the custom events needed some adjustment so I opened #2003.
Version:
@inertiajs/svelte
version: 1.3.0-beta.1Describe the problem:
Types for
@inertiajs/svelte
indicate thatuse:inertia
must receive additional arguments, even though it doesn't need them.Looks like it may be fixed by 69292ef3592ccca5e0f05f7ce131a53f6c1ba22b, but I'm not sure.
Steps to reproduce:
Use
use:inertia
action without any arguments and run TypeScript.