import type { RemoteObject, RpcMethod } from "../rpc.js"; import type { ThreadService } from "../services.js"; /** Exported-class kind of the main thread's log sink. */ export declare const LOG_SINK_KIND = "log-sink"; /** Methods of the main thread's log sink. */ export type LogSinkProtocol = { /** Write every record received so far (synchronous; backs a worker's `logger.flush()`). */ flush: RpcMethod<[], void>; }; /** Boot globals of {@link loggerThreadService}. */ export interface LoggerServiceGlobals { /** Main thread's log sink (a {@link RemoteLogSink} on the worker). */ readonly sink: MainLogSink; } /** Main-thread log sink of worker records; crosses to workers by reference. */ export declare class MainLogSink { /** Write main's buffered records now. */ flush(): void; } /** Worker-side proxy of the main thread's {@link MainLogSink}. */ export declare class RemoteLogSink { #private; constructor(remote: RemoteObject); /** Block until main wrote every record posted before this call. */ flush(): void; } /** Makes a worker's `logger.flush()` wait for main to write its records. */ export declare const loggerThreadService: ThreadService;