From 61882e95557e392010b6984d54e3d8128ec50e22 Mon Sep 17 00:00:00 2001 From: Ye Yu <140394258+NeilYeTAT@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:52:20 +0800 Subject: [PATCH] fix(types): correct default value for `useThrottle` delay parameter Previously, the TypeScript declaration for `useThrottle` did not reflect the actual default value of the `delay` parameter. This fix ensures that the default value (`500ms`) is correctly represented in the type definition. --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index db01dc2..1bd8285 100644 --- a/index.d.ts +++ b/index.d.ts @@ -240,7 +240,7 @@ declare module "@uidotdev/usehooks" { export function useSpeech(text: string, options?: SpeechOptions): SpeechState; - export function useThrottle(value: T, delay: number): T; + export function useThrottle(value: T, delay = 500): T; export function useToggle( initialValue?: boolean