Javascript Update Array Of Objects In Typescript Compiler