Offload functions to worker threads with shared memory primitives for Node.js.
'moroutine': minor#
Add isTask() type guard for narrowing tasks to a specific moroutine
if (isTask(isPrime, task)) {
// task: Task<boolean, [n: number]>
const [n] = task.args;
}
- Moroutines returned by
mo()now expose a readonlyidfor stable identity isTask(mo, task)returnstruewhentaskwas produced bymo, and narrows the task to the descriptor type produced by that moroutineTask<T, A>.argsis now typed asA(previouslyunknown[]) so narrowing propagates to argument access — unchanged forTask<T>without a specialized arg tuple