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) }