Typescript Function Declaration Prototype 2