You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
9
-
/**
10
-
* Console logging facilities.
11
-
*/
12
-
interfaceConsole{
13
-
/**
14
-
* A simple assertion test that verifies whether value is truthy. If it is not, Assertion failed is logged. If provided, the error message is formatted using `util.format()` by passing along all message arguments. The output is used as the error message.
15
-
*/
16
-
assert(value?: any, ...message: any[]): void;
17
-
18
-
/**
19
-
* Maintains an internal counter specific to `label` and outputs to stdout the number of times `console.count()` has been called with the given `label`.
20
-
*/
21
-
count(label?: string): void;
22
-
23
-
/**
24
-
* Resets the internal counter specific to `label`.
25
-
*/
26
-
countReset(label?: string): void;
27
-
28
-
/**
29
-
* Log a message at the `debug` level.
30
-
*/
31
-
debug(...message: any[]): void;
32
-
33
-
/**
34
-
* Log a message at the `error` level.
35
-
*/
36
-
error(...message: any[]): void;
37
-
38
-
/**
39
-
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
40
-
*/
41
-
group(...label: any[]): void;
42
-
43
-
/**
44
-
* Alias for `group()`
45
-
*/
46
-
groupCollapsed(...label: any[]): void;
47
-
48
-
/**
49
-
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
50
-
*/
51
-
groupEnd(): void;
52
-
53
-
/**
54
-
* Log a message at the `info` level.
55
-
*/
56
-
info(...message: any[]): void;
57
-
58
-
/**
59
-
* Log a message at the `info` level.
60
-
*/
61
-
log(...message: any[]): void;
62
-
63
-
/**
64
-
* Start a timer to track duration of an operation.
65
-
*/
66
-
time(label?: string): void;
67
-
68
-
/**
69
-
* Stop a timer that was previously started.
70
-
*/
71
-
timeEnd(label?: string): void;
72
-
73
-
/**
74
-
* Log duration taken so far for an operation.
75
-
*/
76
-
timeLog(label?: string, ...data: any[]): void;
77
-
78
-
/**
79
-
* Log a message at the `trace` level.
80
-
*/
81
-
trace(...message: any[]): void;
82
-
83
-
/**
84
-
* Log a message at the `warn` level.
85
-
*/
86
-
warn(...message: any[]): void;
6
+
declare module 'console'{
7
+
global{
8
+
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
9
+
/**
10
+
* Console logging facilities.
11
+
*/
12
+
interfaceConsole{
13
+
/**
14
+
* A simple assertion test that verifies whether value is truthy. If it is not, Assertion failed is logged. If provided, the error message is formatted using `util.format()` by passing along all message arguments. The output is used as the error message.
15
+
*/
16
+
assert(value?: any, ...message: any[]): void;
17
+
18
+
/**
19
+
* Maintains an internal counter specific to `label` and outputs to stdout the number of times `console.count()` has been called with the given `label`.
20
+
*/
21
+
count(label?: string): void;
22
+
23
+
/**
24
+
* Resets the internal counter specific to `label`.
25
+
*/
26
+
countReset(label?: string): void;
27
+
28
+
/**
29
+
* Log a message at the `debug` level.
30
+
*/
31
+
debug(...message: any[]): void;
32
+
33
+
/**
34
+
* Log a message at the `error` level.
35
+
*/
36
+
error(...message: any[]): void;
37
+
38
+
/**
39
+
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
40
+
*/
41
+
group(...label: any[]): void;
42
+
43
+
/**
44
+
* Alias for `group()`
45
+
*/
46
+
groupCollapsed(...label: any[]): void;
47
+
48
+
/**
49
+
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
50
+
*/
51
+
groupEnd(): void;
52
+
53
+
/**
54
+
* Log a message at the `info` level.
55
+
*/
56
+
info(...message: any[]): void;
57
+
58
+
/**
59
+
* Log a message at the `info` level.
60
+
*/
61
+
log(...message: any[]): void;
62
+
63
+
/**
64
+
* Start a timer to track duration of an operation.
0 commit comments