1
0
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:
Hung-Han (Henry) Chen 2021-07-13 09:46:16 +03:00
parent 450376c778
commit db8a4464c3
No known key found for this signature in database
GPG Key ID: 54B44603D251B788

View File

@ -51,8 +51,8 @@ const logger = winston.createLogger({
});
type Logger = ReturnType<typeof winston.createLogger>;
type LoggerKeys = keyof typeof logger;
type LoggerError = typeof logger.error;
type LoggerKeys = keyof Logger;
type LoggerError = Logger["error"];
/**
* Type guard to ensure unknown is logger.error function