Copyright (c) Meta Platforms, Inc. and affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Format

interface TimerMixin {
    cancelAnimationFrame: ((handle) => void);
    clearImmediate: {
        (handle): void;
        (immediateId): void;
    };
    clearInterval: {
        (handle): void;
        (intervalId): void;
    };
    clearTimeout: {
        (handle): void;
        (timeoutId): void;
    };
    requestAnimationFrame: ((callback) => number);
    setImmediate: typeof setImmediate;
    setInterval: typeof setInterval;
    setTimeout: typeof setTimeout;
}

Properties

cancelAnimationFrame: ((handle) => void)

Type declaration

    • (handle): void
    • Parameters

      • handle: number

      Returns void

clearImmediate: {
    (handle): void;
    (immediateId): void;
}

Type declaration

    • (handle): void
    • Parameters

      • handle: number

      Returns void

    • (immediateId): void
    • Cancels an Immediate object created by setImmediate().

      Parameters

      Returns void

      Since

      v0.9.1

clearInterval: {
    (handle): void;
    (intervalId): void;
}

Type declaration

    • (handle): void
    • Copyright (c) Meta Platforms, Inc. and affiliates.

      This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

      Parameters

      • handle: number

      Returns void

      Format

    • (intervalId): void
    • Cancels a Timeout object created by setInterval().

      Parameters

      • intervalId: undefined | string | number | Timeout

      Returns void

      Since

      v0.0.1

clearTimeout: {
    (handle): void;
    (timeoutId): void;
}

Type declaration

    • (handle): void
    • Parameters

      • handle: number

      Returns void

    • (timeoutId): void
    • Cancels a Timeout object created by setTimeout().

      Parameters

      • timeoutId: undefined | string | number | Timeout

      Returns void

      Since

      v0.0.1

requestAnimationFrame: ((callback) => number)

Type declaration

    • (callback): number
    • Parameters

      • callback: ((time) => void)
          • (time): void
          • Parameters

            • time: number

            Returns void

      Returns number

setImmediate: typeof setImmediate
setInterval: typeof setInterval
setTimeout: typeof setTimeout