Allow overriding fetch implementation

This commit is contained in:
Andras Schmelczer 2025-02-25 22:52:47 +00:00
parent 6999276af4
commit 9cebf53707
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 17 additions and 6 deletions

View file

@ -45,6 +45,10 @@ export class SyncClient {
return this._database.getDocuments().size;
}
public set fetchImplementation(fetch: typeof globalThis.fetch) {
this._syncService.fetchImplementation = fetch;
}
public static async create(
fs: FileSystemOperations,
persistence: PersistenceProvider<