Skip to content

Commit 31e5cb0

Browse files
keeplearning66OrbisKantfu
authored
fix(useTimeout): fix type typo (#5147)
Co-authored-by: Robin <robin.kehl@singular-it.de> Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
1 parent 47687a5 commit 31e5cb0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/shared/useTimeout/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export interface UseTimeoutOptions<Controls extends boolean> extends UseTimeoutF
1818
callback?: Fn
1919
}
2020

21-
export type UseTimoutReturn = ComputedRef<boolean> | { readonly ready: ComputedRef<boolean> } & Stoppable
21+
export type UseTimeoutReturn = ComputedRef<boolean> | { readonly ready: ComputedRef<boolean> } & Stoppable
22+
/**
23+
* @deprecated use UseTimeoutReturn instead
24+
*/
25+
export type UseTimoutReturn = UseTimeoutReturn
2226

2327
/**
2428
* Update value after a given time with controls.
@@ -29,7 +33,7 @@ export type UseTimoutReturn = ComputedRef<boolean> | { readonly ready: ComputedR
2933
*/
3034
export function useTimeout(interval?: MaybeRefOrGetter<number>, options?: UseTimeoutOptions<false>): ComputedRef<boolean>
3135
export function useTimeout(interval: MaybeRefOrGetter<number>, options: UseTimeoutOptions<true>): { ready: ComputedRef<boolean> } & Stoppable
32-
export function useTimeout(interval: MaybeRefOrGetter<number> = 1000, options: UseTimeoutOptions<boolean> = {}): UseTimoutReturn {
36+
export function useTimeout(interval: MaybeRefOrGetter<number> = 1000, options: UseTimeoutOptions<boolean> = {}): UseTimeoutReturn {
3337
const {
3438
controls: exposeControls = false,
3539
callback,

0 commit comments

Comments
 (0)