global.queueMicrotask
Runs callback in the microtask queue, before the next task.
Utilização
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');Assinaturas
(callback: () => void): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
callback | () => void | Sim | — |
Devolve
void
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.