From f8f9d24c5c1c12797890f91a0e0b0536cbb7154c Mon Sep 17 00:00:00 2001 From: Federico Date: Mon, 28 Oct 2024 14:50:15 +0700 Subject: [PATCH] Support readonly arrays --- delegate.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/delegate.ts b/delegate.ts index c3cc363..7e995cf 100644 --- a/delegate.ts +++ b/delegate.ts @@ -73,7 +73,7 @@ function delegate< TElement extends Element = ParseSelector, TEventType extends EventType = EventType, >( - selector: Selector | Selector[], + selector: Selector | readonly Selector[], type: TEventType, callback: DelegateEventHandler, options?: DelegateOptions @@ -83,7 +83,7 @@ function delegate< TElement extends Element = HTMLElement, TEventType extends EventType = EventType, >( - selector: string | string[], + selector: string | readonly string[], type: TEventType, callback: DelegateEventHandler, options?: DelegateOptions @@ -94,7 +94,7 @@ function delegate< TElement extends Element, TEventType extends EventType = EventType, >( - selector: string | string[], + selector: string | readonly string[], type: TEventType, callback: DelegateEventHandler, options: DelegateOptions = {},