Array.filter<S extends T>(predicate: (value: T,index: number,array: T[],) => value is S,thisArg?: any,): S[]
Array.filter(predicate: (value: T,index: number,array: T[],) => unknown,thisArg?: any,): T[]
Returns the elements of an array that meet the condition specified in a callback function.
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.