interface WorkerTaskReply
Since 0.1.0

A task outcome posted by the worker back to the pool.

Properties

readonly
__hewp: 1

Protocol marker.

readonly
kind: "reply"

Discriminant.

readonly
id: number

Correlation id echoed from the request.

readonly
ok: boolean

Whether the task handler returned normally.

readonly
optional
result: unknown

The handler's return value when ok is true.

readonly
optional
error: WorkerErrorShape

The serialized error when ok is false.

Usage

import { type WorkerTaskReply } from "common/src/index.ts";