From 8140e4f2c373fa2c76d68a11e13c03284761d266 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Mon, 9 May 2022 14:23:57 +0200 Subject: [PATCH] fix typescript errors --- src/logging/NullLogger.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/logging/NullLogger.ts b/src/logging/NullLogger.ts index 9e9b576b..f6f877b3 100644 --- a/src/logging/NullLogger.ts +++ b/src/logging/NullLogger.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ import {LogLevel} from "./LogFilter"; -import type {ILogger, ILogItem, LabelOrValues, LogCallback, LogItemValues} from "./types"; +import type {ILogger, ILogItem, ILogReporter, LabelOrValues, LogCallback, LogItemValues} from "./types"; function noop (): void {} @@ -25,6 +25,10 @@ export class NullLogger implements ILogger { addReporter() {} + get reporters(): ReadonlyArray { + return []; + } + getOpenRootItems(): Iterable { return []; } @@ -58,13 +62,13 @@ export class NullLogger implements ILogger { } export class NullLogItem implements ILogItem { - public readonly logger: ILogger; + public readonly logger: NullLogger; public readonly logLevel: LogLevel; public children?: Array; public values: LogItemValues; public error?: Error; - constructor(logger: ILogger) { + constructor(logger: NullLogger) { this.logger = logger; }