Events (core)
Types & Interfaces
WorkerCallEvent
Event emitted from a worker while a proxied worker method is executing.
import { WorkerCallEvent } from '@hexajs-dev/core';
interface WorkerCallEvent<T = unknown> {
callId: string;
workerName: string;
eventType: string;
data?: T;
}
Functions
emitWorkerEvent
Emits a host-visible event from the currently executing worker call.
Use this inside a worker method to stream progress, status updates, or other intermediate signals back to the host code that wrapped the proxy with .
import { emitWorkerEvent } from '@hexajs-dev/core';
function emitWorkerEvent<T = unknown>(eventType: string, data?: T): void