From: http://usejsdoc.org/tags-callback.html#examples
/**
* @class
*/
function Requester() {}
/**
* Send a request.
* @param {Requester~requestCallback} cb - The callback that handles the response.
*/
Requester.prototype.send = function(cb) {
// code
};
/**
* This callback is displayed as part of the Requester class.
* @callback Requester~requestCallback
* @param {number} responseCode
* @param {string} responseMessage
*/
The above code results in the error: Unexpected token, expected , . Removing the Requester~ prefix seems to make things happy, but then the callback is documented globally.
From: http://usejsdoc.org/tags-callback.html#examples
The above code results in the error:
Unexpected token, expected ,. Removing theRequester~prefix seems to make things happy, but then the callback is documented globally.