feat: add global htmx type declaration for TypeScript

Add htmx to Window interface in alpine.ts to support:
- TypeScript type checking for htmx.trigger() calls
- Shared type declaration across bookshelf.ts and bookPicker.ts
- No imports needed - globally available via window.htmx

Declaration:
- trigger(element: HTMLElement | string, event: string): void

Used by bookshelf and bookPicker modules for HTMX programmatic triggers.
This commit is contained in:
2026-03-20 11:47:13 -04:00
parent b9cc6f424f
commit 026eb4c086
+3
View File
@@ -4,6 +4,9 @@ import Alpine from "alpinejs";
declare global {
interface Window {
Alpine: typeof Alpine;
htmx: {
trigger: (element: HTMLElement | string, event: string) => void;
};
}
}