export function compact(arr: Array): Array> { return arr.filter( (item): item is NonNullable => item !== undefined && item !== null, ); }