@wpazderski/js-utils
    Preparing search index...

    TimeoutScheduler is a scheduler that executes the callback after a specified delay using setTimeout().

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _isFrozen: boolean = false

    Indicates whether the scheduler is frozen.

    allowSchedulingWhenScheduled: boolean = false

    Indicates whether the scheduler allows scheduling (scheduleCore() call) when it is already scheduled. This can be overridden in subclasses to change the default behavior.

    The callback function to be executed by the scheduler.

    Options for the timeout scheduler.

    shouldBeScheduledOnUnfreeze: boolean = false

    Indicates whether the scheduler should be scheduled on unfreeze.

    timeoutHandle: null | TimeoutHandle = null

    Handle returned by setTimeout(). Value depends on the environment:

    • In browsers, it is a number.
    • In Node.js, it is a NodeJS.Timeout object.

    Accessors

    Methods

    • Freezes the scheduler, preventing it from executing the callback. If the scheduler is currently scheduled, it will be canceled and then rescheduled on unfreeze(). If the scheduler is already frozen, this method does nothing.

      Returns void

    • Unfreezes the scheduler, allowing it to execute the callback again. If the scheduler was frozen with a scheduled callback, it will be rescheduled. If schedule() was called while frozen, it will be scheduled now. If the scheduler is not frozen, this method does nothing.

      Returns void