Skip to content

Commit d29fc46

Browse files
posvapi0
authored andcommitted
fix(types): allow passing extra arguments (#46)
1 parent dfc9d27 commit d29fc46

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

types/consola.d.ts

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
declare interface ConsolaReporter {
2-
log: (logObj: any, { async, stdout, stderr }: any) => void
2+
log: (logObj: any, { async, stdout, stderr }: any) => void
33
}
44

55
declare class Consola {
6-
// Built-in log levels
7-
static fatal (message: any): void;
8-
static error (message: any): void;
9-
static warn (message: any): void;
10-
static log (message: any): void;
11-
static info (message: any): void;
12-
static start (message: any): void;
13-
static success (message: any): void;
14-
static ready (message: any): void;
15-
static debug (message: any): void;
16-
static trace(message: any): void;
17-
18-
// Create
19-
static create(options: any): (typeof Consola);
20-
static withDefaults(defaults: any): (typeof Consola);
21-
22-
static withTag(tag: string): (typeof Consola);
23-
static withScope(tag: string): (typeof Consola);
24-
25-
// Reporter
26-
static addReporter(reporter: ConsolaReporter): (typeof Consola);
27-
static setReporters(reporters: Array<ConsolaReporter>): (typeof Consola);
28-
29-
static removeReporter(reporter: any): (typeof Consola);
30-
static remove(reporter: any): (typeof Consola);
31-
static clear(reporter: any): (typeof Consola);
32-
33-
// Wrappers
34-
static wrapAll(): void;
35-
static restoreAll(): void;
36-
static wrapConsole(): void;
37-
static restoreConsole(): void;
38-
static wrapStd(): void;
39-
static restoreStd(): void;
40-
41-
// Pause/Resume
42-
static pauseLogs(): void;
43-
static pause(): void;
44-
45-
static resumeLogs(): void;
46-
static resume(): void;
47-
48-
// Mock
49-
static mockTypes(mockFn: any): any;
50-
static mock(mockFn: any): any;
6+
// Built-in log levels
7+
static fatal(message: any, ...args: any[]): void
8+
static error(message: any, ...args: any[]): void
9+
static warn(message: any, ...args: any[]): void
10+
static log(message: any, ...args: any[]): void
11+
static info(message: any, ...args: any[]): void
12+
static start(message: any, ...args: any[]): void
13+
static success(message: any, ...args: any[]): void
14+
static ready(message: any, ...args: any[]): void
15+
static debug(message: any, ...args: any[]): void
16+
static trace(message: any, ...args: any[]): void
17+
18+
// Create
19+
static create(options: any): typeof Consola
20+
static withDefaults(defaults: any): typeof Consola
21+
22+
static withTag(tag: string): typeof Consola
23+
static withScope(tag: string): typeof Consola
24+
25+
// Reporter
26+
static addReporter(reporter: ConsolaReporter): typeof Consola
27+
static setReporters(reporters: Array<ConsolaReporter>): typeof Consola
28+
29+
static removeReporter(reporter: any): typeof Consola
30+
static remove(reporter: any): typeof Consola
31+
static clear(reporter: any): typeof Consola
32+
33+
// Wrappers
34+
static wrapAll(): void
35+
static restoreAll(): void
36+
static wrapConsole(): void
37+
static restoreConsole(): void
38+
static wrapStd(): void
39+
static restoreStd(): void
40+
41+
// Pause/Resume
42+
static pauseLogs(): void
43+
static pause(): void
44+
45+
static resumeLogs(): void
46+
static resume(): void
47+
48+
// Mock
49+
static mockTypes(mockFn: any): any
50+
static mock(mockFn: any): any
5151
}
5252

53-
declare module "consola" {
54-
export default Consola;
53+
declare module 'consola' {
54+
export default Consola
5555
}

0 commit comments

Comments
 (0)