@types/setimmediate
- Version 1.0.4
- Published
- 4.43 kB
- No dependencies
- MIT license
Install
npm i @types/setimmediate
yarn add @types/setimmediate
pnpm add @types/setimmediate
Overview
TypeScript definitions for setimmediate
Index
Functions
Functions
function clearImmediate
clearImmediate: (handle: number) => void;
Aborts the specified macrotask before it's run.
Parameter handle
The ID of the macrotask to remove from the macrotask queue.
function setImmediate
setImmediate: <T extends unknown[]>( callback: (...args: T) => void, ...args: T) => number;
Schedules a macrotask to run after the current events have been processed.
Unlike microtasks (scheduled using the Node 0.10+
process.nextTick
API), where scheduling additional microtasks inside a microtask will cause them to be run inside the same microtask checkpoint, any macrotasks scheduled inside a macrotask will not be executed until the next iteration of the event loop.Parameter callback
The macrotask to schedule.
Parameter args
The arguments to pass to the macrotask callback.
The ID of the macrotask, which can be used to abort the macrotask with
clearImmediate
.
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/setimmediate
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/setimmediate)
- HTML<a href="https://www.jsdocs.io/package/@types/setimmediate"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1623 ms. - Missing or incorrect documentation? Open an issue for this package.