@yesstudio/nuxt-composables
    Preparing search index...

    Function useTimeout

    • Manages the delayed execution of a callback.

      Parameters

      • callback: () => void

        The callback to invoke after the timeout elapses.

      • timeout: MaybeRefOrGetter<number>

        The number of milliseconds to wait before invoking the callback.

      • Optionaloptions: UseTimeoutOptions

        Optional configuration options.

      Returns UseTimeout

      An object with a readonly reference indicating whether the callback is currently scheduled for delayed execution, and methods to start and stop the callback.

      useTimeout(() => console.log('Hello, World!'), 1000, { immediate: true })