Skip to Content
API reference

queueMicrotask

Horst provides this optional JVM helper. It adds a callback to the calling thread’s Promise queue.

Hosthost-providedTypeScript only

Set up the Horst host to use this API.

queueMicrotask function

declare function queueMicrotask(callback: () => void): void

Queues callback as one job on the job queue of the calling thread, behind the promise jobs queued before it. Throws an IllegalStateException on a thread without an event loop. An exception from callback goes to the uncaught exception handler of the loop thread, and the next job runs.

Generated when the website builds, from horst.d.ts.

Language

TypeScriptDeclarations the compiler checksJVMNo JVM typeSwiftNot generated yet

Remembered on every API page

On this page