-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
66 lines (61 loc) · 1.87 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
declare module '@ajar/marker'{
type LogFunc = (...args: any[])=> string;
type ErrorLogFunc = (err: Error)=> {msg:string,stack:string[]};
interface Obj{
[key: string]:any
}
type ObjectLogFunc = (obj:Obj,label?:string) => {actual_label:string};
interface Constants{
Reset:string;
Bold:string;
Dim:string;
Underscore:string;
Blink:string;
Reverse:string;
Hidden:string;
//Colors
NoColor:string;
Black:string;
Red:string;
Green:string;
Yellow:string;
Blue:string;
Magenta:string;
Cyan:string;
White:string;
//Backgrounds
BgBlack:string;
BgRed:string;
BgGreen:string;
BgYellow:string;
BgBlue:string;
BgMagenta:string;
BgCyan:string;
BgWhite:string;
}
//by levels shorthand
export const n : LogFunc;
export const v : LogFunc;
export const d : LogFunc;
export const i : LogFunc;
export const w : LogFunc;
export const e : LogFunc;
//by explicit levels
export const none: LogFunc;
export const verbose: LogFunc;
export const debug: LogFunc;
export const info: LogFunc;
export const warn: LogFunc;
export const err: LogFunc;
//by color names
export const red: LogFunc;
export const green: LogFunc;
export const blue: LogFunc;
export const cyan: LogFunc;
export const yellow: LogFunc;
export const magenta: LogFunc;
//some extras
export const obj: ObjectLogFunc;
export const error: ErrorLogFunc;
export const constants: Constants;
}