use readonly constructor props.

This commit is contained in:
Miroslav Šedivý
2021-10-04 00:22:11 +02:00
parent fcc57bf2fc
commit 79856e29a1
10 changed files with 45 additions and 50 deletions

View File

@ -1,11 +1,8 @@
export class Logger {
protected _scope: string = 'main'
constructor(scope?: string) {
if (scope) {
this._scope = scope
}
}
// eslint-disable-next-line
constructor(
protected readonly _scope: string = 'main',
) {}
protected _console(level: string, m: string, fields?: Record<string, any>) {
let t = ''