Typescript Declare Function Variable