2019-01-28 16:33:23 -08:00
|
|
|
declare module 'electron-store' {
|
2019-02-08 21:02:03 -08:00
|
|
|
declare function callback(string, string): void;
|
|
|
|
|
2019-01-28 16:33:23 -08:00
|
|
|
declare class ElectronStore {
|
|
|
|
constructor({
|
|
|
|
defaults?: Object,
|
|
|
|
name?: string,
|
|
|
|
cwd?: string,
|
|
|
|
encryptionKey?: string | Buffer,
|
|
|
|
fileExtension?: string,
|
|
|
|
}): ElectronStore;
|
|
|
|
|
2019-02-11 05:52:51 -08:00
|
|
|
set(key: string, value: any): void;
|
2019-01-28 16:33:23 -08:00
|
|
|
set(payload: Object): void;
|
2019-02-11 05:52:51 -08:00
|
|
|
get(key: string): any;
|
2019-01-28 16:33:23 -08:00
|
|
|
has(key: string): boolean;
|
|
|
|
delete(key: string): void;
|
|
|
|
clear(): void;
|
2019-02-08 21:02:03 -08:00
|
|
|
onDidChange(key: string, cb: typeof callback): void;
|
2019-01-28 16:33:23 -08:00
|
|
|
size: number;
|
|
|
|
store: Object;
|
|
|
|
path: string;
|
|
|
|
openInEditor(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare export default typeof ElectronStore;
|
|
|
|
}
|