forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
convict.d.ts
33 lines (29 loc) · 782 Bytes
/
convict.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Type definitions for node-convict v0.6.0
// Project: https://github.com/mozilla/node-convict
// Definitions by: Wim Looman <https://github.com/Nemo157>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "convict" {
function convict(schema: convict.Schema): convict.Config;
module convict {
interface Schema {
[name: string]: convict.Schema | {
default: any;
doc?: string;
format?: any;
env?: string;
arg?: string;
};
}
interface Config {
get(name: string): any;
default(name: string): any;
has(name: string): boolean;
set(name: string, value: any): void;
load(conf: Object): void;
loadFile(file: string): void;
loadFile(files: string[]): void;
validate(): void;
}
}
export = convict;
}