How To Create A Function In Typescript