Created
April 26, 2019 01:02
-
-
Save cwparsons/68554d991b8341c0aafc720a89e6f9fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'delegated-events' { | |
type Event = { | |
bubbles: boolean; | |
cancelable: boolean; | |
currentTarget: Element; | |
deepPath?: () => EventTarget[]; | |
defaultPrevented: boolean; | |
eventPhase: number; | |
isTrusted: boolean; | |
scoped: boolean; | |
srcElement: Element; | |
target: Element; | |
timeStamp: number; | |
type: string; | |
preventDefault(): void; | |
stopImmediatePropagation(): void; | |
stopPropagation(): void; | |
} | |
type EventListenerOptions = { | |
capture?: boolean | |
}; | |
export function on(name: string, selector: string, handler: EventListenerOrEventListenerObject, options?: EventListenerOptions): void; | |
export function off(name: string, selector: string, handler: EventListenerOrEventListenerObject, options?: EventListenerOptions): void; | |
export function fire(target: EventTarget, name: string, detail?: any): boolean; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment