import { ILogLevel, PowerSyncConnectionOptions, SubscribedStream } from '@powersync/common'; import { SharedSyncImplementation, SharedSyncInitOptions, WrappedSyncPort } from './SharedSyncImplementation.js'; /** * A client to the shared sync worker. * * The shared sync implementation needs a per-client view of subscriptions so that subscriptions of closed tabs can * automatically be evicted later. */ export declare class WorkerClient { private readonly sync; private readonly port; private resolvedPort; protected resolvedPortPromise: Promise | null; constructor(sync: SharedSyncImplementation, port: MessagePort); private removePort; /** * Called by a client after obtaining a lock with a random name. * * When the client tab is closed, its lock will be returned. So when the shared worker attempts to acquire the lock, * it can consider the connection to be closed. */ addLockBasedCloseSignal(name: string): Promise; setLogLevel(level: ILogLevel): void; triggerCrudUpload(): void; setParams(params: SharedSyncInitOptions, subscriptions: SubscribedStream[]): Promise; getWriteCheckpoint(): Promise; hasCompletedSync(): Promise; connect(options?: PowerSyncConnectionOptions): Promise; updateSubscriptions(subscriptions: SubscribedStream[]): void; disconnect(): Promise; }