Typeerror Is Not A Function Typescript, When I run the following typescript code It throws the error TypeError: error.