I am encountering a problem when building the project where it shows errors in 2 functions. Can someone please assist me?
The first error message is as follows:
Argument of type 'IFilmCard[] | undefined' is not assignable to parameter of type 'IFilmCard[]'.
Type 'undefined' is not assignable to type 'IFilmCard[]'
export function __filterFilms(crts: [string, string?], arr: IFilmCard[]) {
return __filterByGenre(crts[0], __filterByYear(crts[1], arr))
}
The second error message is as follows:
Argument of type 'IPersonCard[] | undefined' is not assignable to parameter of type 'IPersonCard[]'.Type 'undefined' is not assignable to type 'IPersonCard[]'
export function __filterPersons(crts: [string, string?], arr: IPersonCard[]) {
return __filterByCountry(crts[0], __filterByYearsPersons(crts[1], arr))
}