Javascript Passing Callback Function In Typescript