From 54141446c030216630c96fe6f0dd706a310bb7d2 Mon Sep 17 00:00:00 2001 From: Alex Reardon Date: Thu, 5 May 2022 14:19:30 +1000 Subject: [PATCH] nicer ordering of types --- src/types.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/types.ts b/src/types.ts index 3731431..f1d36b2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,12 +20,6 @@ type GetEventType< ? ExtractEventTypeFromHandler : Event; -export type Binding = { - type: EventName; - listener: Listener; - options?: boolean | AddEventListenerOptions; -}; - // For listener objects, the handleEvent function has the object as the `this` binding type ListenerObject = { handleEvent(this: ListenerObject, e: TEvent): void; @@ -35,3 +29,9 @@ type ListenerObject = { export type Listener = | ListenerObject> | { (this: Target, e: GetEventType): void }; + +export type Binding = { + type: EventName; + listener: Listener; + options?: boolean | AddEventListenerOptions; +};