Skip to content

Commit 8073f27

Browse files
authored
Specify this type for BaseLogger methods (#5198)
This allows https://typescript-eslint.io/rules/unbound-method/ to be happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 3bb22a9 commit 8073f27

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/logger.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,35 @@ export interface BaseLogger {
5252
*
5353
* @param msg - Data to log.
5454
*/
55-
trace(...msg: any[]): void;
55+
trace(this: void, ...msg: any[]): void;
5656

5757
/**
5858
* Output debug message to the logger.
5959
*
6060
* @param msg - Data to log.
6161
*/
62-
debug(...msg: any[]): void;
62+
debug(this: void, ...msg: any[]): void;
6363

6464
/**
6565
* Output info message to the logger.
6666
*
6767
* @param msg - Data to log.
6868
*/
69-
info(...msg: any[]): void;
69+
info(this: void, ...msg: any[]): void;
7070

7171
/**
7272
* Output warn message to the logger.
7373
*
7474
* @param msg - Data to log.
7575
*/
76-
warn(...msg: any[]): void;
76+
warn(this: void, ...msg: any[]): void;
7777

7878
/**
7979
* Output error message to the logger.
8080
*
8181
* @param msg - Data to log.
8282
*/
83-
error(...msg: any[]): void;
83+
error(this: void, ...msg: any[]): void;
8484
}
8585

8686
// This is to demonstrate, that you can use any namespace you want.

0 commit comments

Comments
 (0)