Typescript Findindex Is Not A Function Error