Typescript Add Object To Array With Function C