-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
65 lines (47 loc) · 1.32 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
// Type definitions for think-logger in ThinkJs 3.x
// Project: https://thinkjs.org/
// Definitions by: SijieCai <https://github.com/SijieCai>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace ThinkLogger {
interface Log4jsConfig {
levels?: string;
appenders: any;
categories: any;
}
interface Base {
debug(msg: string): void;
info(msg: string): void;
warn(msg: string): void;
error(msg: string): void;
configure(config: Log4jsConfig | string): any;
setLogger(config: Log4jsConfig | string): any;
formatConfig(config: Log4jsConfig | string): Log4jsConfig;
}
interface Console extends Base {}
interface File extends Base {}
interface DateFile extends Base {}
export interface Logger {
debug(msg: string): void;
info(msg: string): void;
warn(msg: string): void;
error(msg: string): void;
}
export interface LoggerConstructor {
new (config: any): Logger;
Basic: Base;
Console: Console;
File: File;
DateFile: DateFile;
}
export class Console implements Console {
}
export class Base implements Base {
}
export class LoggerConstructor implements LoggerConstructor {
}
export class DateFile implements DateFile {
}
export class File implements File {
}
}
export = ThinkLogger;