Typescript Is Not A Function Error