7
rated 0 times
[
8]
[
1]
/ answers: 1 / hits: 16416
/ 8 Years ago, thu, november 3, 2016, 12:00:00
hey guys i'd like to know how to make a callback function in typescript.
I know how to do it in vanilla JS :
function mySandwich(param1, param2, callback) {
alert('Started eating my sandwich.nnIt has: ' + param1 + ', ' + param2);
callback();}
mySandwich('ham', 'cheese', function() {
alert('Finished eating my sandwich.');});
But i can't find a way to do it with TS.
you guys have an example of it?
thank you!
More From » web