Typescript Array.findindex Example