export function filterDefined(array: (T | null | undefined)[]) { return array.filter((item) => item) as T[] }