From 405f0a8ec84f54d777007845560fe06ef715f5da Mon Sep 17 00:00:00 2001 From: Oskar Danielsson Date: Mon, 25 Nov 2024 15:19:08 +0100 Subject: [PATCH 1/2] Update jsDoc for useCountdown --- packages/usehooks-ts/src/useCountdown/useCountdown.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/usehooks-ts/src/useCountdown/useCountdown.ts b/packages/usehooks-ts/src/useCountdown/useCountdown.ts index ed33b110..c1bb11db 100644 --- a/packages/usehooks-ts/src/useCountdown/useCountdown.ts +++ b/packages/usehooks-ts/src/useCountdown/useCountdown.ts @@ -45,11 +45,12 @@ type CountdownControllers = { * @see [Documentation](https://usehooks-ts.com/react-hook/use-countdown) * @example * ```tsx - * const [counter, { start, stop, reset }] = useCountdown({ - * countStart: 10, - * intervalMs: 1000, - * isIncrement: false, - * }); + * const [counter, { startCountdown, stopCountdown, resetCountdown }] = + * useCountdown({useCountdown({ + * countStart: 10, + * intervalMs: 1000, + * isIncrement: false, + * }); * ``` */ export function useCountdown({ From 40f9d8b2f681f7f5766cf97cd2253345049bf581 Mon Sep 17 00:00:00 2001 From: Oskar Danielsson Date: Mon, 25 Nov 2024 15:21:28 +0100 Subject: [PATCH 2/2] Fix indentation --- .../usehooks-ts/src/useCountdown/useCountdown.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/usehooks-ts/src/useCountdown/useCountdown.ts b/packages/usehooks-ts/src/useCountdown/useCountdown.ts index c1bb11db..b9adb49a 100644 --- a/packages/usehooks-ts/src/useCountdown/useCountdown.ts +++ b/packages/usehooks-ts/src/useCountdown/useCountdown.ts @@ -45,12 +45,12 @@ type CountdownControllers = { * @see [Documentation](https://usehooks-ts.com/react-hook/use-countdown) * @example * ```tsx - * const [counter, { startCountdown, stopCountdown, resetCountdown }] = - * useCountdown({useCountdown({ - * countStart: 10, - * intervalMs: 1000, - * isIncrement: false, - * }); + * const [counter, { startCountdown, stopCountdown, resetCountdown }] = + * useCountdown({useCountdown({ + * countStart: 10, + * intervalMs: 1000, + * isIncrement: false, + * }); * ``` */ export function useCountdown({