This commit is contained in:
Andras Schmelczer 2026-09-23 08:14:33 +01:00
commit 498eb47fd8
2 changed files with 26 additions and 29 deletions

View file

@ -0,0 +1,5 @@
/** Replace the complete metadata value atomically. */
export interface MetadataPersistenceProvider<T> {
load: () => Promise<T | undefined>;
save: (data: T) => Promise<void>;
}

View file

@ -1,8 +0,0 @@
/** save() atomically replaces the entire value and resolves only after both the
* data and its directory entry are durable across power loss. Failed saves must
* leave either complete value readable; callers retain their recovery journal.
*/
export interface PersistenceProvider<T> {
load: () => Promise<T | undefined>;
save: (data: T) => Promise<void>;
}