import { Buf } from './buf'; export namespace Config { const enum LEVEL { SYSTEM = 1, XDG = 2, GLOBAL = 3, LOCAL = 4, APP = 5, HIGHEST_LEVEL = -1, } const enum MAP { FALSE = 0, TRUE = 1, INT32 = 2, STRING = 3, } } export class ConfigEntry { // the documentation says those are variables, // but in reality they are functions level(): number; name(): number; value(): string; } export class Config { static findGlobal(): Promise; // the docs says it's a buff but it's actually a string static findProgramdata(): Promise; static findSystem(): Promise; static findXdg(): Promise; static openDefault(): Promise; static openOndisk(path: string): Promise; deleteEntry(name: string): number; deleteMultivar(name: string, regexp: string): number; getBool(name: string): Promise; getEntry(name: string): Promise; getInt32(name: string): Promise; getInt64(name: string): Promise; getPath(name: string): Promise; // the docs says Buf but it's actually a string getStringBuf(name: string): Promise; lock(transaction: any): number; setBool(name: string, value: number): Promise; setInt32(name: string, value: number): Promise; setInt64(name: string, value: number): Promise; setMultivar(name: string, regexp: string, value: string): Promise; setString(name: string, value: string): Promise; snapshot(): Promise; }