piclist
Version:
Modified PicGo core, A tool for picture uploading
21 lines (20 loc) • 595 B
TypeScript
interface IJSON {
[propsName: string]: string | number | IJSON;
}
import { IConfig, IPicGo } from '../types';
declare class DB {
private readonly ctx;
private readonly db;
constructor(ctx: IPicGo);
read(flush?: boolean): IJSON;
getSingle(key?: string): any;
get(key: string): any;
get(key: string[]): any[];
set(key: string, value: any): void;
has(key: string): boolean;
unset(key: string, value: any): boolean;
saveConfig(config: Partial<IConfig>): void;
removeConfig(config: IConfig): void;
getConfigPath(): string;
}
export default DB;