From eee8f1bf33e26deb6cb08f312e28100094d7d1fe Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 17 Aug 2022 02:44:09 +0200 Subject: [PATCH] Improve typing, remove obsolete console.log --- UI/Base/SubtleButton.ts | 1 - Utils.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/UI/Base/SubtleButton.ts b/UI/Base/SubtleButton.ts index 32931845f..ccc09b156 100644 --- a/UI/Base/SubtleButton.ts +++ b/UI/Base/SubtleButton.ts @@ -78,7 +78,6 @@ export class SubtleButton extends UIElement { }) const loading = new Lazy(() => new Loading(loadingText) ) return new VariableUiElement(state.map(st => { - console.log("State is: ", st) if(st === "idle"){ return button } diff --git a/Utils.ts b/Utils.ts index 370e76f5f..f727cbad9 100644 --- a/Utils.ts +++ b/Utils.ts @@ -151,8 +151,8 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be return res; } - public static NoNull(array: T[]): T[] { - return array?.filter(o => o !== undefined && o !== null) + public static NoNull(array: T[]): NonNullable[] { + return array?.filter(o => o !== undefined && o !== null) } public static Hist(array: string[]): Map {