@types/nanoscheduler
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Installation

npm install --save @types/nanoscheduler

Summary

This package contains type definitions for nanoscheduler (https://github.com/choojs/nanoscheduler#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanoscheduler.

index.d.ts

/**
 * Create a new scheduler instance.
 * The instance is shared as a singleton on window (if available).
 */
declare function createScheduler(): scheduler.NanoScheduler;

declare namespace scheduler {
    /**
     * Schedule work to be completed when the user agent is idle. Weighs 270 bytes compressed.
     */
    abstract class NanoScheduler {
        constructor(hasWindow: boolean);
        /**
         * Push a callback into the scheduler, to be executed when the user agent is idle.
         */
        push(cb: () => void): void;
        schedule(): void;
        setTimeout(cb: () => void): void;
    }
}

export = createScheduler;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/nanoscheduler

Weekly Downloads

400

Version

1.0.2

License

MIT

Unpacked Size

3.9 kB

Total Files

5

Last publish

Collaborators

  • types