ConsoleLoggerService: Fix ESLint errors

We now use @types/cli-color to provide type information

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-24 20:39:25 +01:00
parent a0ffa3be04
commit b22d641406
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 9 additions and 3 deletions

View file

@ -58,6 +58,7 @@
"@nestjs/cli": "7.5.6",
"@nestjs/schematics": "7.2.8",
"@nestjs/testing": "7.6.13",
"@types/cli-color": "^2.0.0",
"@types/express": "4.17.11",
"@types/jest": "26.0.20",
"@types/node": "13.13.45",

View file

@ -6,12 +6,12 @@
import { Injectable, Optional, Scope } from '@nestjs/common';
import { isObject } from '@nestjs/common/utils/shared.utils';
import * as clc from 'cli-color';
import clc = require('cli-color');
import DateTimeFormatOptions = Intl.DateTimeFormatOptions;
@Injectable({ scope: Scope.TRANSIENT })
export class ConsoleLoggerService {
private classContext;
private classContext: string;
private lastTimestamp: number;
constructor(@Optional() context?: string) {
@ -68,7 +68,7 @@ export class ConsoleLoggerService {
);
}
private makeContextString(functionContext) {
private makeContextString(functionContext: string) {
let context = this.classContext;
if (functionContext) {
context += '.' + functionContext + '()';

View file

@ -846,6 +846,11 @@
"@types/connect" "*"
"@types/node" "*"
"@types/cli-color@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/cli-color/-/cli-color-2.0.0.tgz#dc64e32da0fb9ea1814300fb468a58e833ce71a6"
integrity sha512-E2Oisr73FjwxMHkYU6RcN9P9mmrbG4TNQMIebWhazYxOgWRzA7s4hM+DtAs6ZwiwKFbPst42v1XUAC1APIhRJA==
"@types/connect@*":
version "3.4.34"
resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.34.tgz#170a40223a6d666006d93ca128af2beb1d9b1901"