homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
13 lines (12 loc) • 490 B
TypeScript
export interface JsonWriteOptions {
spaces?: number;
backupTo?: string;
}
export declare class JsonFileStoreService {
private readonly locks;
read<T>(path: string): Promise<T>;
mutate<T>(path: string, mutator: (current: T | null) => T | null | undefined | Promise<T | null | undefined>, opts?: JsonWriteOptions): Promise<T | null | undefined>;
write<T>(path: string, data: T, opts?: JsonWriteOptions): Promise<void>;
private withLock;
private atomicWrite;
}