Typescript Array Prototype Add Function