Typescript Prototype Add Function