diff --git a/src/handle.js b/src/handle.js index ca4484c..75aa537 100644 --- a/src/handle.js +++ b/src/handle.js @@ -12,7 +12,7 @@ const log = Object.assign(debug('mss:handle'), { }) /** - * @typedef {import('./types').DuplexStream} DuplexStream + * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('./types').AbortOptions} AbortOptions */ diff --git a/src/index.js b/src/index.js index 3da0958..93c2b14 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,8 @@ const { PROTOCOL_ID } = require('./constants') exports.PROTOCOL_ID = PROTOCOL_ID /** - * @typedef {import('./types').DuplexStream} DuplexStream + * @typedef {import('bl/BufferList')} BufferList + * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('./types').AbortOptions} AbortOptions */ @@ -24,8 +25,7 @@ class MultistreamSelect { /** * Perform the multistream-select handshake * - * @param {object} [options] - * @param {AbortSignal} options.signal + * @param {AbortOptions} [options] */ async _handshake (options) { if (this._shaken) return @@ -38,16 +38,14 @@ class MultistreamSelect { class Dialer extends MultistreamSelect { /** * @param {string | string[]} protocols - * @param {object} [options] - * @param {AbortSignal} options.signal + * @param {AbortOptions} [options] */ select (protocols, options) { return select(this._stream, protocols, this._shaken ? undefined : PROTOCOL_ID, options) } /** - * @param {object} [options] - * @param {AbortSignal} options.signal + * @param {AbortOptions} [options] */ async ls (options) { await this._handshake(options) diff --git a/src/ls.js b/src/ls.js index 720e179..53511b8 100644 --- a/src/ls.js +++ b/src/ls.js @@ -14,8 +14,8 @@ const log = Object.assign(debug('mss:ls'), { }) /** - * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('bl/BufferList')} BufferList + * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('./types').AbortOptions} AbortOptions */ diff --git a/src/select.js b/src/select.js index 57e9037..0a1dc5e 100644 --- a/src/select.js +++ b/src/select.js @@ -11,8 +11,8 @@ const log = Object.assign(debug('mss:select'), { }) /** - * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('bl/BufferList')} BufferList + * @typedef {import('./types').DuplexStream} DuplexStream * @typedef {import('./types').AbortOptions} AbortOptions */