Skip to content

@lelantos-org/sdk / internal / NoteSink

Interface: NoteSink ​

Defined in: @lelantos-org/sdk/dist/sync/notes-sync.d.ts:28

Destination for sync results, implemented by NoteCache.

Exposes the live NotesFile rather than a NoteStore, whose load() returns a fresh copy: syncing into a second copy would let one save overwrite the other's changes.

Properties ​

file ​

ts
readonly file: NotesFile;

Defined in: @lelantos-org/sdk/dist/sync/notes-sync.d.ts:30

The live notes file. Read for the resume cursor; never replaced.

Methods ​

addHits() ​

ts
addHits(hits): object;

Defined in: @lelantos-org/sdk/dist/sync/notes-sync.d.ts:32

Append hits to the live file in memory. Idempotent by cm.

Parameters ​

ParameterType
hitsScanHit[]

Returns ​

object

added ​
ts
added: StoredNote[];
skipped ​
ts
skipped: number;

checkpoint() ​

ts
checkpoint(cursor): Promise<void>;

Defined in: @lelantos-org/sdk/dist/sync/notes-sync.d.ts:37

Persist the current notes together with cursor.

Parameters ​

ParameterType
cursornumber

Returns ​

Promise<void>