Skip to content

isEventLoopTurnPending

Checks whether the channel behind yieldToEventLoop is open.

It is closed once every pending turn has run, so a test can assert that nothing is left to keep a process or an unloaded plugin’s bundle alive.

Import:

import { isEventLoopTurnPending } from '@mnaoumov/typescript-lib/event-loop-turn';

Signature:

function isEventLoopTurnPending(): boolean

Returns: boolean — true while a turn is pending.