-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
49 lines (40 loc) · 1.07 KB
/
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
41
42
43
44
45
46
47
48
49
/**
* Check required executables
* @param config Configuration loaded by cosmiconfig
* @param config.names Names of required executables
* @returns A promise that resolves when requirement is met, rejects for otherwise
*/
declare function main (config?: main.Configuration): Promise<main.Return>
declare namespace main {
interface Configuration {
readonly programs: Configuration.ProgramNames
}
namespace Configuration {
type ProgramNames = ReadonlyArray<string>
}
interface Return {
readonly programs: Return.ProgramDict
}
namespace Return {
interface ProgramDict {
readonly [name: string]: string
}
}
class NotFoundError extends Error {
readonly list: NotFoundError.List
constructor (list: NotFoundError.List)
}
namespace NotFoundError {
export type List = Configuration.ProgramNames
}
class ExternalError extends Error {
report: ExternalError.Report
constructor (list: ExternalError.Report)
}
namespace ExternalError {
interface Report {
readonly [name: string]: Error
}
}
}
export = main