Skip to main content

setImmediate

Less than 1 minutefeatureweb-standard

setImmediate

Modules

Types

function setImmediate<A extends Array<any>>(
  callback: (...args: A) => void,
  ...args: A
): number;
function clearImmediate(id: number): void;

Entry points

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

Example

Exampleopen in new window:

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");
  })
);