-
Notifications
You must be signed in to change notification settings - Fork 0
/
event-target.d.ts
47 lines (38 loc) · 3.79 KB
/
event-target.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
declare namespace BetterTypeScript {
interface EventWithTargets<Target extends EventTarget, CurrentTarget extends EventTarget> extends Event {
target: Target;
currentTarget: CurrentTarget;
}
interface InputEventWithTargets<Target extends EventTarget, CurrentTarget extends EventTarget> extends InputEvent {
target: Target;
currentTarget: CurrentTarget;
}
}
interface Element {
addEventListener(type: "change", listener: (this: Element, ev: BetterTypeScript.EventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, Element>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: Element, ev: BetterTypeScript.InputEventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, Element>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLElement {
addEventListener(type: "change", listener: (this: HTMLElement, ev: BetterTypeScript.EventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, HTMLElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLElement, ev: BetterTypeScript.InputEventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, HTMLElement>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLFieldSetElement {
addEventListener(type: "change", listener: (this: HTMLFieldSetElement, ev: BetterTypeScript.EventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, HTMLFieldSetElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLFieldSetElement, ev: BetterTypeScript.InputEventWithTargets<HTMLInputElement & HTMLSelectElement & HTMLSelectListElement & HTMLTextAreaElement, HTMLFieldSetElement>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLInputElement {
addEventListener(type: "change", listener: (this: HTMLInputElement, ev: BetterTypeScript.EventWithTargets<HTMLInputElement, HTMLInputElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLInputElement, ev: BetterTypeScript.InputEventWithTargets<HTMLInputElement, HTMLInputElement>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLSelectElement {
addEventListener(type: "change", listener: (this: HTMLSelectElement, ev: BetterTypeScript.EventWithTargets<HTMLSelectElement, HTMLSelectElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLSelectElement, ev: BetterTypeScript.InputEventWithTargets<HTMLSelectElement, HTMLSelectElement>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLSelectListElement {
addEventListener(type: "change", listener: (this: HTMLSelectListElement, ev: BetterTypeScript.EventWithTargets<HTMLSelectListElement, HTMLSelectListElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLSelectListElement, ev: BetterTypeScript.InputEventWithTargets<HTMLSelectListElement, HTMLSelectListElement>) => any, options?: boolean | AddEventListenerOptions): void;
}
interface HTMLTextAreaElement {
addEventListener(type: "change", listener: (this: HTMLTextAreaElement, ev: BetterTypeScript.EventWithTargets<HTMLTextAreaElement, HTMLTextAreaElement>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: "input", listener: (this: HTMLTextAreaElement, ev: BetterTypeScript.InputEventWithTargets<HTMLTextAreaElement, HTMLTextAreaElement>) => any, options?: boolean | AddEventListenerOptions): void;
}