Skip to content

Commit

Permalink
chore: add jsdoc suggested by @MarlonPassos-git
Browse files Browse the repository at this point in the history
  • Loading branch information
crishoj authored Aug 11, 2024
1 parent 52f838b commit 862ac0d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/curry/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export type DebounceFunction<TArgs extends any[]> = {
* ```
*/
export function debounce<TArgs extends any[]>(
{ 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<TArgs> {
let timer: unknown = undefined
Expand Down

0 comments on commit 862ac0d

Please sign in to comment.