Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify optional parameters in JSDoc syntax #11

Merged
merged 1 commit into from
Jan 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/sse-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ util.inherits(SseChannel, events.EventEmitter);
/**
* Add a new client to the channel
*
* @param {Request} req Request of the client
* @param {Response} res Response of the client
* @param {Function} callback Callback to run when the client has been added
* @param {Request} req Request of the client
* @param {Response} res Response of the client
* @param {Function} [callback] Optional callback to run when the client has been added
* @return {void}
*/
SseChannel.prototype.addClient = function(req, res, callback) {
Expand Down Expand Up @@ -186,7 +186,7 @@ SseChannel.prototype.retry = function(retryTimeout) {
* @param {Number} msg.id ID of the event (used by clients when reconnecting to ensure all messages are received)
* @param {String} msg.event Event name (used on client side to trigger on specific event names)
* @param {String} msg.retry Retry timeout (same as `retry()`)
* @param {Array} clients Optional array of Response objects - if specified, the message will
* @param {Array} [clients] Optional array of Response objects - if specified, the message will
* be sent only to these clients, as well as bypassing the history.
*/
SseChannel.prototype.send = function(msg, clients) {
Expand Down