From 3de3481765ed4d3a02be5099bb972167bc987810 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 1 Oct 2021 10:05:56 +0200 Subject: [PATCH] prefer optional syntax over '| null' --- src/observable/list/BaseMappedList.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observable/list/BaseMappedList.ts b/src/observable/list/BaseMappedList.ts index f339d113..f2203d34 100644 --- a/src/observable/list/BaseMappedList.ts +++ b/src/observable/list/BaseMappedList.ts @@ -26,10 +26,10 @@ export class BaseMappedList extends BaseObservableList { protected _sourceUnsubscribe: (() => void) | null = null; _mapper: Mapper; _updater: Updater; - _removeCallback: ((value: T) => void) | null; + _removeCallback?: (value: T) => void; _mappedValues: T[] | null = null; - constructor(sourceList: BaseObservableList, mapper: Mapper, updater: Updater, removeCallback: ((value: T) => void) | null = null) { + constructor(sourceList: BaseObservableList, mapper: Mapper, updater: Updater, removeCallback?: (value: T) => void) { super(); this._sourceList = sourceList; this._mapper = mapper;