// 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. * * `closest` was here until htmx 4 removed it: it was `Element.closest` with a * null guard, so callers use the DOM method directly now. */ interface HtmxApi { ajax(method: string, url: string, target: string | { target: Element; swap?: string }): Promise; trigger(el: Element, name: string, detail?: unknown): void; } declare global { const htmx: HtmxApi; interface Window { htmx: HtmxApi; } }