No geenric

This commit is contained in:
Andras Schmelczer 2026-09-29 22:26:51 +01:00
commit c897b60176
3 changed files with 8 additions and 5 deletions

View file

@ -29,7 +29,10 @@ export type {
} from "./persistence/database"; } from "./persistence/database";
export { FileKind, type FileSystemOperations } from "./file-operations/filesystem-operations"; export { FileKind, type FileSystemOperations } from "./file-operations/filesystem-operations";
export type { FileSnapshot } from "./snapshot"; export type { FileSnapshot } from "./snapshot";
export type { MetadataPersistenceProvider as PersistenceProvider } from "./persistence/metadata-persistence-provider"; export type {
MetadataPersistenceProvider as PersistenceProvider,
StoredClient
} from "./persistence/metadata-persistence-provider";
export type { CursorSpan } from "./services/types/CursorSpan"; export type { CursorSpan } from "./services/types/CursorSpan";
export type { ClientCursors } from "./services/types/ClientCursors"; export type { ClientCursors } from "./services/types/ClientCursors";
export type { NetworkConnectionStatus } from "./types/network-connection-status"; export type { NetworkConnectionStatus } from "./types/network-connection-status";
@ -39,7 +42,7 @@ export type {
} from "./errors/errors"; } from "./errors/errors";
export type { MaybeOutdatedClientCursors } from "./types/maybe-outdated-client-cursors"; export type { MaybeOutdatedClientCursors } from "./types/maybe-outdated-client-cursors";
export { DocumentSyncStatus } from "./types/document-sync-status"; export { DocumentSyncStatus } from "./types/document-sync-status";
export { SyncClient, type StoredClient } from "./sync-client"; export { SyncClient } from "./sync-client";
export type { TextWithCursors, CursorPosition } from "reconcile-text"; export type { TextWithCursors, CursorPosition } from "reconcile-text";
export const debugging = { export const debugging = {

View file

@ -52,7 +52,7 @@ export class SyncClient {
(path: RelativePath) => unknown (path: RelativePath) => unknown
>, >,
private readonly contentCache: FixedSizeDocumentCache, private readonly contentCache: FixedSizeDocumentCache,
private readonly persistence: MetadataPersistenceProvider<StoredClient> private readonly persistence: MetadataPersistenceProvider
) { ) {
syncer.onServerHistoryChanged.add(() => { syncer.onServerHistoryChanged.add(() => {
cursorTracker.reset(); cursorTracker.reset();
@ -109,7 +109,7 @@ export class SyncClient {
webSocket webSocket
}: { }: {
fs: FileSystemOperations; fs: FileSystemOperations;
persistence: MetadataPersistenceProvider<StoredClient>; persistence: MetadataPersistenceProvider;
fetch?: typeof globalThis.fetch; fetch?: typeof globalThis.fetch;
webSocket?: typeof globalThis.WebSocket; webSocket?: typeof globalThis.WebSocket;
}): Promise<SyncClient> { }): Promise<SyncClient> {

View file

@ -33,7 +33,7 @@ test("a small deeply nested manifest fits within a bounded validation heap", ()
assert.equal(result.status, 0, result.stderr || String(result.error)); assert.equal(result.status, 0, result.stderr || String(result.error));
}); });
test("conflict allocation renames the first obstructed component deterministically", () => { test("conflict allocation renames the first colliding component deterministically", () => {
const cases: { wanted: string; occupied: string[]; expected: string }[] = [ const cases: { wanted: string; occupied: string[]; expected: string }[] = [
{ {
wanted: "Notes/a.md", wanted: "Notes/a.md",