From dd46bfdf3b016082cfd320922d6d866ab7c8d908 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 30 Apr 2024 17:54:38 +0200 Subject: [PATCH] Chore: improve typings --- src/Utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Utils.ts b/src/Utils.ts index cc0d6a47d..eee1171e2 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -263,6 +263,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be return res } + public static NoNull(array: T[] | undefined): (T[] | undefined) + public static NoNull(array: undefined): undefined + public static NoNull(array: T[]): T[] public static NoNull(array: T[]): NonNullable[] { return array?.filter((o) => o !== undefined && o !== null) }