Fix main & improve cursor sync #101

Merged
schmelczer merged 16 commits from asch/fix-main into main 2025-08-25 17:15:52 +01:00
Showing only changes of commit 115c1067f9 - Show all commits

View file

@ -37,7 +37,7 @@ export interface DocumentRecord {
documentId: DocumentId;
metadata: DocumentMetadata | undefined;
isDeleted: boolean;
updates: Promise<void>[];
updates: Promise<unknown>[];
parallelVersion: number;
}
@ -135,7 +135,7 @@ export class Database {
this.save();
}
public removeDocumentPromise(promise: Promise<void>): void {
public removeDocumentPromise(promise: Promise<unknown>): void {
const entry = this.documents.find(({ updates }) =>
updates.includes(promise)
);
@ -167,7 +167,7 @@ export class Database {
public async getResolvedDocumentByRelativePath(
relativePath: RelativePath,
promise: Promise<void>
promise: Promise<unknown>
): Promise<DocumentRecord> {
const entry = this.getLatestDocumentByRelativePath(relativePath);
@ -191,7 +191,7 @@ export class Database {
public createNewPendingDocument(
documentId: DocumentId,
relativePath: RelativePath,
promise: Promise<void>
promise: Promise<unknown>
): DocumentRecord {
const previousEntry =
this.getLatestDocumentByRelativePath(relativePath);