Back to Core Js

setImmediate

docs/web/docs/features/web-standards/setimmediate.md

3.50.0800 B
Original Source

setImmediate

Module

web.immediate. setImmediate polyfill.

Built-ins signatures

ts
function setImmediate(callback: any, ...args: Array<mixed>): number;
function clearImmediate(id: number): void;

Entry points

plaintext
core-js(-pure)/stable|actual|full/set-immediate
core-js(-pure)/stable|actual|full/clear-immediate

Examples

js
setImmediate((arg1, arg2) => {
  console.log(arg1, arg2); // => Message will be displayed with minimum delay
}, 'Message will be displayed', 'with minimum delay');

clearImmediate(setImmediate(() => {
  console.log('Message will not be displayed');
}));