Adjust logger constant map (#1620)

This commit is contained in:
Jaco
2022-08-02 10:52:23 +03:00
committed by GitHub
parent 43b959ad1f
commit 55d2c149f7
+2 -2
View File
@@ -18,7 +18,7 @@ declare const process: { env: Record<string, string> };
type ConsoleType = 'error' | 'log' | 'warn';
type LogType = ConsoleType | 'debug';
const logTo = {
const logTo = <const> {
debug: 'log',
error: 'error',
log: 'log',
@@ -72,7 +72,7 @@ function apply (log: LogType, type: string, values: Logger$Data, maxSize = -1):
return apply(log, type, Array.isArray(fnResult) ? fnResult : [fnResult], maxSize);
}
console[logTo[log] as 'log'](
console[logTo[log]](
formatDate(new Date()),
type,
...values