Skip to content

Commit 39c6b50

Browse files
committed
allow firing events on Document in TypeScript
1 parent 51b310d commit 39c6b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ type DelegatedEventListener = (this: Element, ev: CustomEvent & {currentTarget:
33
export function on<K extends keyof GlobalEventHandlersEventMap>(name: K, selector: string, listener: (this: GlobalEventHandlers & Element, ev: GlobalEventHandlersEventMap[K] & {currentTarget: Element}) => any, options?: EventListenerOptions): void;
44
export function on(name: string, selector: string, listener: DelegatedEventListener, options?: EventListenerOptions): void;
55
export function off(name: string, selector: string, listener: DelegatedEventListener, options?: EventListenerOptions): void;
6-
export function fire(target: Element, name: string, detail?: any): boolean;
6+
export function fire(target: Document | Element, name: string, detail?: any): boolean;

0 commit comments

Comments
 (0)