API reference › @evolu/common › local‑first/Shared › DbWorkerOutput
type DbWorkerOutput =
| {
clock: Timestamp;
type: "LeaderAcquired";
}
| {
error: DatabaseHeldError | UnknownError | UnsupportedDbVersionError;
type: "LeaderRefused";
}
| {
attemptId: Id;
response: DbWorkerQueuedResponse;
type: "OnQueuedResponse";
};
Defined in: packages/common/src/local-first/Shared.ts:1383
Union Members
Type Literal
{
clock: Timestamp;
type: "LeaderAcquired";
}
Type Literal
{
error: | DatabaseHeldError
| UnknownError
| UnsupportedDbVersionError;
type: "LeaderRefused";
}
| Name | Type | Description | Defined in |
|---|---|---|---|
error | | DatabaseHeldError | UnknownError | UnsupportedDbVersionError | - | packages/common/src/local-first/Shared.ts:1397 |
type | "LeaderRefused" | The worker refused startup or failed and is releasing its resources. It is the worker's last message on its port and can follow LeaderAcquired. On the web, the tab that hosts a worker whose script failed to load posts it in the worker's place, as the port's only message. | packages/common/src/local-first/Shared.ts:1396 |
Type Literal
{
attemptId: Id;
response: DbWorkerQueuedResponse;
type: "OnQueuedResponse";
}