From 655c316472fb296b0ef1a75a444e66f55bdc6242 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 17 Dec 2024 10:00:18 +0100 Subject: [PATCH] Export ListenerCollection from the main entry point --- src/index.ts | 2 ++ src/util/listener-collection.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 087cd357e..2ba8d0308 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,7 @@ export { formatRelativeDate, formatDateTime, } from './util/date-and-time'; +export { ListenerCollection } from './util/listener-collection'; export { confirm } from './util/prompts'; // Components @@ -159,4 +160,5 @@ export type { DateFormatter, FormatDateTimeOptions, } from './util/date-and-time'; +export type { EventType } from './util/listener-collection'; export type { ConfirmModalProps } from './util/prompts'; diff --git a/src/util/listener-collection.ts b/src/util/listener-collection.ts index 48bf7c80c..75503052b 100644 --- a/src/util/listener-collection.ts +++ b/src/util/listener-collection.ts @@ -14,7 +14,7 @@ export type Listener = { * `HTMLElement.onkeydown` here) If there is no such property, the type defaults * to `Event`. */ -type EventType< +export type EventType< Target extends EventTarget, TypeName extends string, > = `on${TypeName}` extends keyof Target