-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
46 lines (40 loc) · 1.09 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
// Type definitions for clogy
// Project: https://github.com/pgmanutd/clogy
// Definitions by: Prashant Goel <https://github.com/pgmanutd>
type ClogyOptionsT = {
showDateTime?: boolean,
prefix?: string
};
type ClogyLevelsT = {
readonly log: number,
readonly trace: number,
readonly debug: number,
readonly info: number,
readonly warn: number,
readonly error: number,
readonly none: number
};
interface IClogyLogger {
getOptions(): ClogyOptionsT;
setOptions(options: ClogyOptionsT): void;
getLevel(): number | null;
setLevel(level: number | string): void;
stringifyAllowedLoggers(): string;
enableAllLevels(): void;
disableAllLevels(): void;
readonly LEVELS: ClogyLevelsT;
log(...args: Array<any>): void;
trace(...args: Array<any>): void;
debug(...args: Array<any>): void;
info(...args: Array<any>): void;
warn(...args: Array<any>): void;
error(...args: Array<any>): void;
}
interface IClogyMain extends IClogyLogger {
noConflict(): IClogyMain;
decorator(decoFunc: () => void): void;
}
declare const clogy: IClogyMain;
declare module 'clogy' {
export = clogy
}