You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useTimeout is the only function that uses number as it's interval argument. useTimeoutPoll, useInterval, useTimeoutFn all support specifying MaybeRefOrGetter type.
In my opinion, if we pass a variable of type MaybeRefOrGetter as an argument to a composable, one can expect that if the value changes, the composable will react to those changes, but in fact, it won't - the interval won't be changed. That's why I think it is better to have a number type for that.
Clear and concise description of the problem
useTimeout
is the only function that usesnumber
as it's interval argument.useTimeoutPoll
,useInterval
,useTimeoutFn
all support specifyingMaybeRefOrGetter
type.Suggested solution
Change
number
type toMaybeRefOrGetter<number>
Alternative
No response
Additional context
https://vueuse.org/shared/useTimeout
https://github.com/vueuse/vueuse/blob/main/packages/shared/useTimeout/index.ts
Validations
The text was updated successfully, but these errors were encountered: