// Ambient declarations for the browser globals the core lib leans on. export {}; /** The subset of the HTMX JS API the dispatcher uses. HTMX is loaded as a * classic vendored script (`static/htmx.min.js`), so it's a global. */ interface HtmxApi { ajax(method: string, url: string, target: string | { target: Element; swap?: string }): Promise; trigger(el: Element, name: string, detail?: unknown): void; closest(el: Element, selector: string): Element | null; } declare global { const htmx: HtmxApi; interface Window { htmx: HtmxApi; } }