From 862ac0d83a4abfec5e1df3b7abf2e042a91730ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Rish=C3=B8j?= Date: Sun, 11 Aug 2024 18:10:57 +0200 Subject: [PATCH] chore: add jsdoc suggested by @MarlonPassos-git --- src/curry/debounce.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/curry/debounce.ts b/src/curry/debounce.ts index 6cbd0c39..ffa9fe91 100644 --- a/src/curry/debounce.ts +++ b/src/curry/debounce.ts @@ -37,7 +37,16 @@ export type DebounceFunction = { * ``` */ export function debounce( - { delay, leading = false }: { delay: number; leading?: boolean }, + { delay, leading = false }: { + delay: number; + /** + * Decides whether the source function is called on the first + * invocation of the throttle function or not + * + * @default false + */ + leading?: boolean + }, func: (...args: TArgs) => any, ): DebounceFunction { let timer: unknown = undefined