Skip to content

⬅️ Back to Table of Contents

📄 useTimeout

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 8
🟢 Vue Composition API 1
📐 Interfaces 1
📑 Type Aliases 2

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/useTimeout/index.ts

📦 Imports

Name Source
ComputedRef vue
MaybeRefOrGetter vue
UseTimeoutFnOptions ../useTimeoutFn
Fn ../utils
Stoppable ../utils
computed vue
useTimeoutFn ../useTimeoutFn
noop ../utils

Vue Composition API

Name Type Reactive Variables Composables
computed computed none none

Functions

useTimeout(interval: MaybeRefOrGetter<number>, options: UseTimeoutOptions<false>): ComputedRef<boolean>

Update value after a given time with controls.

Parameters:

  • interval any: No description
  • options any: No description

See: https

Raw JSDoc
/**
 * Update value after a given time with controls.
 *
 * @see   {@link https://vueuse.org/useTimeout}
 * @param interval
 * @param options
 */
Code
export function useTimeout(interval?: MaybeRefOrGetter<number>, options?: UseTimeoutOptions<false>): ComputedRef<boolean>

Interfaces

UseTimeoutOptions<Controls extends boolean>

Interface Code
export interface UseTimeoutOptions<Controls extends boolean> extends UseTimeoutFnOptions {
  /**
   * Expose more controls
   *
   * @default false
   */
  controls?: Controls
  /**
   * Callback on timeout
   */
  callback?: Fn
}

Properties

Name Type Optional Description
controls Controls not shown
callback Fn not shown

Type Aliases

UseTimeoutReturn

type UseTimeoutReturn = ComputedRef<boolean> | { readonly ready: ComputedRef<boolean> } & Stoppable;

UseTimoutReturn

/* * @deprecated use UseTimeoutReturn instead /

type UseTimoutReturn = UseTimeoutReturn;

Generated by Syntax Scribe