-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.d.ts
38 lines (30 loc) · 836 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
declare function logdown(prefix: string, opts?: logdown.LogdownOptions): logdown.Logger;
declare namespace logdown {
type LoggerState = { isEnabled: boolean };
type TransportFunction = (options: TransportOptions) => void;
interface LogdownOptions {
logger?: any;
markdown?: boolean;
prefix?: string;
prefixColor?: string;
plaintext?: boolean;
}
interface TransportOptions {
args: any[];
instance: string;
level: string;
msg: string;
state: LoggerState;
}
let transports: TransportFunction[];
class Logger {
constructor(prefix: string, opts?: LogdownOptions);
debug(...args: any[]): void;
error(...args: any[]): void;
info(...args: any[]): void;
log(...args: any[]): void;
warn(...args: any[]): void;
state: LoggerState;
}
}
export = logdown;