Typescript Add Function To Existing Class