mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Reuse type Logger
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
parent
450376c778
commit
db8a4464c3
@ -51,8 +51,8 @@ const logger = winston.createLogger({
|
|||||||
});
|
});
|
||||||
|
|
||||||
type Logger = ReturnType<typeof winston.createLogger>;
|
type Logger = ReturnType<typeof winston.createLogger>;
|
||||||
type LoggerKeys = keyof typeof logger;
|
type LoggerKeys = keyof Logger;
|
||||||
type LoggerError = typeof logger.error;
|
type LoggerError = Logger["error"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type guard to ensure unknown is logger.error function
|
* Type guard to ensure unknown is logger.error function
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user