gx
chenyc
2025-06-12 7b72ac13a83764a662159d4a49b7fffb90476ecb
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Type definitions for winston 3.0
// Project: https://github.com/winstonjs/winston
 
/// <reference types="node" />
 
declare namespace winston {
  interface AbstractConfigSetLevels {
    [key: string]: number;
  }
 
  interface AbstractConfigSetColors {
    [key: string]: string | string[];
  }
 
  interface AbstractConfigSet {
    levels: AbstractConfigSetLevels;
    colors: AbstractConfigSetColors;
  }
 
  interface CliConfigSetLevels extends AbstractConfigSetLevels {
    error: number;
    warn: number;
    help: number;
    data: number;
    info: number;
    debug: number;
    prompt: number;
    verbose: number;
    input: number;
    silly: number;
  }
 
  interface CliConfigSetColors extends AbstractConfigSetColors {
    error: string | string[];
    warn: string | string[];
    help: string | string[];
    data: string | string[];
    info: string | string[];
    debug: string | string[];
    prompt: string | string[];
    verbose: string | string[];
    input: string | string[];
    silly: string | string[];
  }
 
  interface NpmConfigSetLevels extends AbstractConfigSetLevels {
    error: number;
    warn: number;
    info: number;
    http: number;
    verbose: number;
    debug: number;
    silly: number;
  }
 
  interface NpmConfigSetColors extends AbstractConfigSetColors {
    error: string | string[];
    warn: string | string[];
    info: string | string[];
    http: string | string[];
    verbose: string | string[];
    debug: string | string[];
    silly: string | string[];
  }
 
  interface SyslogConfigSetLevels extends AbstractConfigSetLevels {
    emerg: number;
    alert: number;
    crit: number;
    error: number;
    warning: number;
    notice: number;
    info: number;
    debug: number;
  }
 
  interface SyslogConfigSetColors extends AbstractConfigSetColors {
    emerg: string | string[];
    alert: string | string[];
    crit: string | string[];
    error: string | string[];
    warning: string | string[];
    notice: string | string[];
    info: string | string[];
    debug: string | string[];
  }
 
  interface Config {
    allColors: AbstractConfigSetColors;
    cli: { levels: CliConfigSetLevels, colors: CliConfigSetColors };
    npm: { levels: NpmConfigSetLevels, colors: NpmConfigSetColors };
    syslog: { levels: SyslogConfigSetLevels, colors: SyslogConfigSetColors };
 
    addColors(colors: AbstractConfigSetColors): void;
  }
}
 
declare const winston: winston.Config;
export = winston;