mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Added missing types in nodegit/config.d.ts 0.26.5 (#46065)
* Added missing types in config.d.ts * Changed findGlobal return type
This commit is contained in:
parent
22457a0b6a
commit
8dbfc33d63
34
types/nodegit/config.d.ts
vendored
34
types/nodegit/config.d.ts
vendored
@ -9,16 +9,44 @@ export namespace Config {
|
||||
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 openDefault(): Promise<Config>;
|
||||
static findGlobal(): Promise<string>; // the docs says it's a buff but it's actually a string
|
||||
static findProgramdata(): Promise<Buf>;
|
||||
static findSystem(): Promise<Buf>;
|
||||
static findXdg(): Promise<Buf>;
|
||||
static openDefault(): Promise<Config>;
|
||||
static openOndisk(path: string): Promise<Config>;
|
||||
|
||||
deleteEntry(name: string): number;
|
||||
deleteMultivar(name: string, regexp: string): number;
|
||||
getBool(name: string): Promise<number>;
|
||||
getEntry(name: string): Promise<ConfigEntry>;
|
||||
getInt32(name: string): Promise<number>;
|
||||
getInt64(name: string): Promise<number>;
|
||||
getPath(name: string): Promise<string>; // the docs says Buf but it's actually a string
|
||||
getStringBuf(name: string): Promise<Buf>;
|
||||
lock(transaction: any): number;
|
||||
setBool(name: string, value: number): Promise<number>;
|
||||
setInt32(name: string, value: number): Promise<number>;
|
||||
setInt64(name: string, value: number): number;
|
||||
setMultivar(name: string, regexp: string, value: string): number;
|
||||
setMultivar(name: string, regexp: string, value: string): Promise<number>;
|
||||
setString(name: string, value: string): Promise<number>;
|
||||
snapshot(): Promise<Config>;
|
||||
lock(transaction: any): number;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user