Typescript Array Indexof In Javascript