// Extend the AlpineJS window object declare global { interface Window { Alpine: { directive(name: string, callback: (el: HTMLElement, { expression }: { expression: string }, { evaluateLater, effect }: { evaluateLater: (exp: string) => () => void; effect: (callback: () => void) => void }) => void): void; } } } // Extend the HTMLElement type to include our custom directive in the type system declare module 'alpinejs' { interface AlpineElement { ['x-call-func']?: string; } }