File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ export type InferEvent<TTarget, TType extends string> =
20
20
? Parameters < Extract < TTarget [ `on${TType } `] , AnyFunction > > [ 0 ]
21
21
: Event ;
22
22
23
- export type Listener < TTarget extends EventTarget , TEvent extends Event > =
24
- | { ( this : TTarget , ev : TEvent ) : void }
25
- | ListenerObject < TEvent > ;
26
-
23
+ // For listener objects, the handleEvent function has the object as the `this` binding
27
24
interface ListenerObject < TEvent extends Event > {
28
- // For listener objects, the handleEvent function has the object as the `this` binding
29
25
handleEvent ( this : ListenerObject < TEvent > , event : TEvent ) : void ;
30
26
}
31
27
28
+ export type Listener < TTarget extends EventTarget , TEvent extends Event > =
29
+ | { ( this : TTarget , ev : TEvent ) : void }
30
+ | ListenerObject < TEvent > ;
31
+
32
32
export type Binding < TTarget extends EventTarget = EventTarget , TType extends string = string > = {
33
33
type : TType ;
34
34
listener : Listener < TTarget , InferEvent < TTarget , TType > > ;
You can’t perform that action at this time.
0 commit comments