From 2268288ebce7e56bacb10d35bfb221e33a0faa85 Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:22:50 -0400 Subject: [PATCH] feat(debounce): add `handler` property --- src/curry/debounce.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/curry/debounce.ts b/src/curry/debounce.ts index f2c5529a1..1ab312234 100644 --- a/src/curry/debounce.ts +++ b/src/curry/debounce.ts @@ -17,6 +17,10 @@ export interface DebounceFunction { * `undefined` will be returned. */ flush(...args: TArgs): void + /** + * The underlying function + */ + readonly handler: (...args: TArgs) => void } /** @@ -69,6 +73,7 @@ export function debounce( } debounced.isPending = () => timeout !== undefined + debounced.handler = handler return debounced }