alpine.types.ts 446 B

12345678910111213141516171819
  1. declare global {
  2. interface Window {
  3. Components: any;
  4. }
  5. }
  6. export interface AlpineContext {
  7. $el?: Element;
  8. $refs?: { [name: string]: Element; };
  9. $event?: Event;
  10. $dispatch?: (name: string, data: any) => void;
  11. $watch?: (prop: string, handler: (value: any) => void) => void;
  12. $nextTick?: (handler: () => void) => void;
  13. [prop: string]: any;
  14. }
  15. export interface AlpineEvent extends Event {
  16. detail: any;
  17. }