Typescript Add Function In Arraylist Collections