4 lines
115 B
TypeScript
4 lines
115 B
TypeScript
export function filterDefined<T>(array: (T | null | undefined)[]) {
|
|
return array.filter((item) => item) as T[]
|
|
}
|