/// <reference types="node" />
import { ServiceWorkerWorkerData } from "./worker";
import { WorkerOptions } from "node:worker_threads";
import { TheAsyncThing } from "@virtualstate/promise/the-thing";
import type { DurableEventData } from "../../data";
export declare function getServiceWorkerWorkerWorker(options?: WorkerOptions): Promise<import("worker_threads").Worker>;
export declare function executeServiceWorkerWorkerMessage(data?: ServiceWorkerWorkerData): Promise<unknown>;
export interface Pushable<T, R> {
    push(data: T): TheAsyncThing<R>;
    close(): Promise<void>;
}
export declare function createServiceWorkerWorker(): Promise<Pushable<ServiceWorkerWorkerData, unknown>>;
export declare function executeServiceWorkerWorker(data?: ServiceWorkerWorkerData): AsyncIterable<unknown>;
export declare function dispatchServiceWorkerEvent(event: DurableEventData): Promise<void>;
