From affbf086e4bde96b07d1eed874885104993b1659 Mon Sep 17 00:00:00 2001 From: Ctibor Laky Date: Tue, 16 Apr 2024 09:09:15 +0200 Subject: [PATCH] docs: adds default values to useThrottleFn notation adds default values into docs notation as they are not explicitly visible in docs web https://vueuse.org/shared/useThrottleFn/ --- packages/shared/useThrottleFn/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/shared/useThrottleFn/index.ts b/packages/shared/useThrottleFn/index.ts index 1b9fce8a8f1..d68b4f4c8d8 100644 --- a/packages/shared/useThrottleFn/index.ts +++ b/packages/shared/useThrottleFn/index.ts @@ -8,12 +8,13 @@ import { createFilterWrapper, throttleFilter } from '../utils' * @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is, * to `callback` when the throttled-function is executed. * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful. + * (default value: 200) * - * @param [trailing] if true, call fn again after the time is up + * @param [trailing] if true, call fn again after the time is up (default value: false) * - * @param [leading] if true, call fn on the leading edge of the ms timeout + * @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true) * - * @param [rejectOnCancel] if true, reject the last call if it's been cancel + * @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false) * * @return A new, throttled, function. */