Looking to properly document the sock
and data
variables using JSDoc in my code.
var exec = {
/**
* @param {Number} sock
* @param {String} data
*/
1: (sock, data) => {
console.log("GG");
},
2: (sock, data) => {
},
3: (sock, data) => {
}
};
In this context, let's define sock as a Number
and data as a String
.
/**
* @param {Number} sock
* @param {String} data
*/
The goal here is to add JSDoc annotations just once for the entire object.