item is optional here

This commit is contained in:
Bruno Windels 2021-11-17 11:08:44 +01:00
parent 90d7b73dd4
commit 3ee7e73ff0

View file

@ -35,7 +35,7 @@ export abstract class BaseLogger {
}
/** if item is a log item, wrap the callback in a child of it, otherwise start a new root log item. */
wrapOrRun<T>(item: ILogItem, labelOrValues: LabelOrValues, callback: LogCallback<T>, logLevel?: LogLevel, filterCreator?: FilterCreator): T {
wrapOrRun<T>(item: ILogItem | undefined, labelOrValues: LabelOrValues, callback: LogCallback<T>, logLevel?: LogLevel, filterCreator?: FilterCreator): T {
if (item) {
return item.wrap(labelOrValues, callback, logLevel, filterCreator);
} else {