From e3682754fe2fd67167aa2b2457e47230cdc34c77 Mon Sep 17 00:00:00 2001 From: ankitchaudharyy Date: Mon, 10 Oct 2022 14:43:50 +0530 Subject: [PATCH] refactor: remove nested template literals (#337) --- src/lib/logger.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/logger.ts b/src/lib/logger.ts index 7fec1a7d7..f3a1079b4 100644 --- a/src/lib/logger.ts +++ b/src/lib/logger.ts @@ -149,6 +149,7 @@ export const logTypeScriptMessage = (message: string) => { export const logTypeScriptError = (code: number, message: string, fileName: string, line: number, character: number) => { const fileInfo = `${chalk.cyan(fileName)}:${chalk.yellow(line + 1)}:${chalk.yellow(character + 1)}` - const error = `${chalk.red('error')} ${chalk.gray(`TS${code}:`)}` - console.error(`${TSLogo} ${fileInfo} - ${error} ${message}`) + const error = chalk.red(`error`) + const errorCode = chalk.gray(`TS${code}:`) + console.error(`${TSLogo} ${fileInfo} - ${error} ${errorCode} ${message}`) }