Skip to content

Commit 5290364

Browse files
the-ressjohnnyreilly
authored andcommitted
Don't limit Options.logger to Console type (#143)
1 parent 6eb146f commit 5290364

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/index.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ const customHooks = {
3232

3333
type Formatter = (message: NormalizedMessage, useColors: boolean) => string;
3434

35+
interface Logger {
36+
error(message?: any): void;
37+
warn(message?: any): void;
38+
info(message?: any): void;
39+
}
40+
3541
interface Options {
3642
tsconfig: string;
3743
tslint: string | true;
@@ -40,7 +46,7 @@ interface Options {
4046
ignoreDiagnostics: number[];
4147
ignoreLints: string[];
4248
colors: boolean;
43-
logger: Console;
49+
logger: Logger;
4450
formatter: 'default' | 'codeframe' | Formatter;
4551
formatterOptions: any;
4652
silent: boolean;
@@ -70,7 +76,7 @@ class ForkTsCheckerWebpackPlugin {
7076
watch: string[];
7177
ignoreDiagnostics: number[];
7278
ignoreLints: string[];
73-
logger: Console;
79+
logger: Logger;
7480
silent: boolean;
7581
async: boolean;
7682
checkSyntacticErrors: boolean;

0 commit comments

Comments
 (0)