• Version 1.0.4
  • Published
  • 4.43 kB
  • No dependencies
  • MIT license


npm i @types/setimmediate
yarn add @types/setimmediate
pnpm add @types/setimmediate


TypeScript definitions for setimmediate



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.


To add a badge like this onejsDocs.io badgeto 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
  • 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>