-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
40 lines (35 loc) · 870 Bytes
/
index.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
34
35
36
37
38
39
40
interface Defaults {
enableArgv: boolean,
enableEnv: boolean,
setNodeEnv: boolean,
dir: string,
group: string,
config: string,
id: string,
defaultFileName: string,
defaultNodeEnv: string,
warn: boolean,
throw: boolean,
exts: string|string[]
}
type Subset<T> = Partial<{
[P in keyof T]: T[P] extends object ? Subset<T[P]> : T[P]
}>;
type FactoryFn = {
(opts?: Subset<Defaults>): Config;
}
declare class Config {
constructor (opts?: Subset<Defaults>);
opts: Defaults;
refreshOpts (): void;
getFileList (): string[];
resolve (): Promise<object>;
resolveSync (): object;
handleError (err: Error): void;
static get defaults (): Defaults;
static factory (): FactoryFn;
}
declare const conf: Awaited<Promise<object>>;
export {
conf as default, conf, conf as config, Config
};