[TS] Renamed file extensions to typescript

This commit is contained in:
Dunemask 2024-03-29 16:45:43 -06:00
parent 4d5b347767
commit 4a6f20fa7b
31 changed files with 12 additions and 0 deletions

28
lib/util/logging.ts Normal file
View file

@ -0,0 +1,28 @@
// Imports
import { Chalk } from "chalk";
const { redBright, greenBright, yellowBright, cyanBright, magentaBright } =
new Chalk({ level: 2 });
// Logging
const logColor = (color, header, ...args) =>
console.log(color(header), ...args);
export const logError = (...args) => logColor(redBright, ...args);
export const logConfirm = (...args) => logColor(greenBright, ...args);
export const logWarn = (...args) => logColor(yellowBright, ...args);
export const logInfo = (...args) => logColor(cyanBright, ...args);
export const logVerbose = (...args) => logColor(magentaBright, ...args);
export const ERR = (header, ...args) => logError(`[${header}]`, ...args);
export const OK = (header, ...args) => logConfirm(`[${header}]`, ...args);
export const WARN = (header, ...args) => logWarn(`[${header}]`, ...args);
export const INFO = (header, ...args) => logInfo(`[${header}]`, ...args);
export const VERB = (header, ...args) => logVerbose(`[${header}]`, ...args);