When creating a javascript function that takes a callback as argument, I can add types for IntelliSense like so:
/**
* @param {function(number) : void} cb
*/
function takesCallback1(cb) {}
or like so
/**
* @param {(x: number) => void} cb
*/
function takesCallback2(cb) {}
What's the difference between the two and which should be used for what situation?