started to convert to typescript

This commit is contained in:
grimhilt
2023-04-01 16:32:29 +02:00
parent 1d761fa6df
commit 9fbf5e5cf3
32 changed files with 1045 additions and 3897 deletions

View File

@@ -3,19 +3,19 @@ class Logger {
}
log(content) {
console.log(this._prefix("log"), content);
log(...content): void {
// console.log(this._prefix("log"), content);
}
warn(content) {
console.warn(this._prefix("warn"), content);
warn(...content): void {
// console.warn(this._prefix("warn"), content);
}
error(content) {
console.error(this._prefix("err"), content);
error(...content): void {
// console.error(this._prefix("err"), content);
}
_prefix(type) {
_prefix(type: string): string {
let typeStr = "";
switch (type) {
case "log":
@@ -39,7 +39,4 @@ class Logger {
}
const logger = new Logger();
module.exports = {
logger,
}
export default logger;