Skip to content

Commit

Permalink
JSDoc: indicate optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Dec 2, 2023
1 parent c1f0675 commit a758953
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,10 @@ class Connection {
* without putting user credentials into the page.
*
* @param {string|Function} jid - The full JID that is bound by the session.
* @param {string} sid - The SID of the BOSH session.
* @param {number} rid - The current RID of the BOSH session. This RID
* @param {string} [sid] - The SID of the BOSH session.
* @param {number} [rid] - The current RID of the BOSH session. This RID
* will be used by the next request.
* @param {Function} callback The connect callback function.
* @param {Function} [callback] - The connect callback function.
* @param {number} [wait] - The optional HTTPBIND wait value. This is the
* time the server will wait before returning an empty result for
* a request. The default setting of 60 seconds is recommended.
Expand Down
8 changes: 4 additions & 4 deletions src/types/connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,10 @@ declare class Connection {
* without putting user credentials into the page.
*
* @param {string|Function} jid - The full JID that is bound by the session.
* @param {string} sid - The SID of the BOSH session.
* @param {number} rid - The current RID of the BOSH session. This RID
* @param {string} [sid] - The SID of the BOSH session.
* @param {number} [rid] - The current RID of the BOSH session. This RID
* will be used by the next request.
* @param {Function} callback The connect callback function.
* @param {Function} [callback] - The connect callback function.
* @param {number} [wait] - The optional HTTPBIND wait value. This is the
* time the server will wait before returning an empty result for
* a request. The default setting of 60 seconds is recommended.
Expand All @@ -689,7 +689,7 @@ declare class Connection {
* @param {number} [wind] - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5.
*/
attach(jid: string | Function, sid: string, rid: number, callback: Function, wait?: number, hold?: number, wind?: number): void;
attach(jid: string | Function, sid?: string, rid?: number, callback?: Function, wait?: number, hold?: number, wind?: number): void;
/**
* Attempt to restore a cached BOSH session.
*
Expand Down

0 comments on commit a758953

Please sign in to comment.