refactor: update to typescript 4.4.4

This commit is contained in:
Rainer Killinger
2022-08-17 10:01:47 +02:00
parent eeda6ef26c
commit e6e75db3e8
10 changed files with 1644 additions and 483 deletions

View File

@@ -14,6 +14,8 @@
*/
import {LogLevel} from '../logger';
import {Transformation} from '../transformation';
import moment from 'moment';
/**
* Transformation that adds a timestamp to output
*/
@@ -22,7 +24,6 @@ export class Timestamp implements Transformation {
* Instantiate a new timestamp transformation
*
* @see https://momentjs.com/docs/#/displaying/format/
*
* @param format Format for timestamps
*/
constructor(private readonly format = 'LLLL') {
@@ -36,7 +37,6 @@ export class Timestamp implements Transformation {
* @param output Output to add timestamp to
*/
transform(_logLevel: LogLevel, output: string): string {
const moment = require('moment');
const now = moment();
return `[${now.format(this.format)}] ${output}`;