zepio/flow-custom-typedefs/electron-store.js

28 lines
667 B
JavaScript
Raw Normal View History

2019-01-28 16:33:23 -08:00
declare module 'electron-store' {
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;
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;
}