function function compact(arr: (string | null)[]): (string | null)[]compact((parameter) arr: (string | null)[]arr: (string | null)[]) {
compacts falsy values out of an array return (parameter) arr: (string | null)[]arr.(method) Array<string | null>.filter(predicate: (value: string | null, index: number, array: (string | null)[]) => unknown, thisArg?: any): (string | null)[] (+1 overload)Returns the elements of an array that meet the condition specified in a callback function.
filter(var Boolean: BooleanConstructorBoolean)
}
const const kept: (string | null)[]kept = function compact(arr: (string | null)[]): (string | null)[]compact(["a", null, "b"])