diff --git a/src/connection.js b/src/connection.js index 56735fe1..9adfaf96 100644 --- a/src/connection.js +++ b/src/connection.js @@ -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. diff --git a/src/types/connection.d.ts b/src/types/connection.d.ts index 5cd78110..59c911f4 100644 --- a/src/types/connection.d.ts +++ b/src/types/connection.d.ts @@ -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. @@ -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. *