UNPKG

@bitblit/ratchet-common

Version:

Common tools for general use

22 lines (21 loc) 1.57 kB
import { RemoteStatusData } from './remote-status-data.js'; import { RemoteStatusDataAndContent } from './remote-status-data-and-content.js'; import { RemoteFileTrackerOptions } from './remote-file-tracker-options.js'; import { RemoteFileTrackerPushOptions } from './remote-file-tracker-push-options.js'; export declare class RemoteFileTracker<KeyType> { private opts; private _remoteStatusData; constructor(opts: RemoteFileTrackerOptions<KeyType>); get remoteStatusData(): RemoteStatusData<KeyType>; sync(): Promise<RemoteStatusData<KeyType>>; pullRemoteData(ifNewerThan?: RemoteStatusData<KeyType>): Promise<RemoteStatusDataAndContent<KeyType>>; static dataAsString(data: RemoteStatusDataAndContent<any>): Promise<string>; static dataAsUint8Array(data: RemoteStatusDataAndContent<any>): Promise<Uint8Array>; static dataAsObject<T>(data: RemoteStatusDataAndContent<any>): Promise<T>; pushStreamToRemote(src: ReadableStream, inPushOpts?: RemoteFileTrackerPushOptions): Promise<RemoteStatusData<KeyType>>; pushStringToRemote(src: string, inPushOpts?: RemoteFileTrackerPushOptions): Promise<RemoteStatusData<KeyType>>; pushUint8ArrayToRemote(src: Uint8Array, inPushOpts?: RemoteFileTrackerPushOptions): Promise<RemoteStatusData<KeyType>>; pushObjectJsonToRemote(src: any, inPushOpts?: RemoteFileTrackerPushOptions): Promise<RemoteStatusData<KeyType>>; modifiedSinceLastSync(skipUpdateLocal?: boolean): Promise<boolean>; static statusMatch(rsd1: RemoteStatusData<any>, rsd2: RemoteStatusData<any>): boolean; }