I am encountering an error stating that Type 'Function' does not match the signature for the filter function below. This is because the filter function expects a specific type. How can I define my callback function to align with what the filter function expects?
private _getItemFilteredBy(itemName: string, Fn: Function): Observable<any[]> {
return this.getItemByName(itemName)
.map((items: any[]) => {
return items.filter( Fn );
});
}