global.queueMicrotask
Runs callback in the microtask queue, before the next task.
Verwendung
Defer a small follow-up until the current synchronous work finishes.
// Defer a small follow-up until the current synchronous work finishes.
const events: string[] = [];
queueMicrotask(() => console.log(events.join(', ')));
events.push('saved');
events.push('closed');Signaturen
(callback: () => void): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
callback | () => void | Ja | — |
Rückgabe
void
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.