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

28 lines
673 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;
set(key: string, value: string): void;
set(payload: Object): void;
get(key: string): string;
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;
}