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.