Javascript Passing Callback Function In Typescript W3schools