File size: 139 Bytes
fa79853 |
1 2 3 4 |
export function filterNullish<T>(arr: (T | null | undefined)[]): T[] {
return arr.filter((x): x is T => x !== undefined && x !== null);
}
|
fa79853 |
1 2 3 4 |
export function filterNullish<T>(arr: (T | null | undefined)[]): T[] {
return arr.filter((x): x is T => x !== undefined && x !== null);
}
|