From be64b106b6bcc12a769135d341f9f62fd7ac7540 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Tue, 13 Jun 2023 03:43:33 +0800 Subject: [PATCH] docs: cleanup jsdoc types --- server/services/clientGatewayService.ts | 82 ++++++++++++------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/server/services/clientGatewayService.ts b/server/services/clientGatewayService.ts index ab5e9a6e0..a6d534087 100644 --- a/server/services/clientGatewayService.ts +++ b/server/services/clientGatewayService.ts @@ -42,173 +42,173 @@ abstract class ClientGatewayService extends BaseService} options - An object of options... - * @return {Promise} - Resolves with an array of hashes of added torrents or rejects with error. + * @param options - An object of options... + * @return - Resolves with an array of hashes of added torrents or rejects with error. */ abstract addTorrentsByFile(options: Required): Promise; /** * Adds torrents by URL * - * @param {Required} options - An object of options... - * @return {Promise} - Resolves with an array of hashes of added torrents or rejects with error. + * @param options - An object of options... + * @return - Resolves with an array of hashes of added torrents or rejects with error. */ abstract addTorrentsByURL(options: Required): Promise; /** * Checks torrents * - * @param {CheckTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract checkTorrents({hashes}: CheckTorrentsOptions): Promise; /** * Gets the list of contents of a torrent. * - * @param {string} hash - Hash of torrent - * @return {Promise} - Resolves with TorrentContentTree or rejects with error. + * @param hash - Hash of torrent + * @return - Resolves with TorrentContentTree or rejects with error. */ abstract getTorrentContents(hash: TorrentProperties['hash']): Promise>; /** * Gets the list of peers of a torrent. * - * @param {string} hash - Hash of torrent - * @return {Promise>} - Resolves with an array of TorrentPeer or rejects with error. + * @param hash - Hash of torrent + * @return - Resolves with an array of TorrentPeer or rejects with error. */ abstract getTorrentPeers(hash: TorrentProperties['hash']): Promise>; /** * Gets the list of trackers of a torrent. * - * @param {string} hash - Hash of torrent - * @return {Promise>} - Resolves with an array of TorrentTracker or rejects with error. + * @param hash - Hash of torrent + * @return - Resolves with an array of TorrentTracker or rejects with error. */ abstract getTorrentTrackers(hash: TorrentProperties['hash']): Promise>; /** * Moves torrents to specified destination path. * - * @param {MoveTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract moveTorrents(options: MoveTorrentsOptions): Promise; /** * Reannounces torrents to trackers * - * @param {ReannounceTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract reannounceTorrents({hashes}: ReannounceTorrentsOptions): Promise; /** * Removes torrents. Optionally deletes data of torrents. * - * @param {DeleteTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract removeTorrents(options: DeleteTorrentsOptions): Promise; /** * Sets initial seeding mode of torrents * - * @param {SetTorrentsInitialSeedingOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentsInitialSeeding(options: SetTorrentsInitialSeedingOptions): Promise; /** * Sets priority of torrents * - * @param {SetTorrentsPriorityOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentsPriority(options: SetTorrentsPriorityOptions): Promise; /** * Sets sequential mode of torrents * - * @param {SetTorrentsSequentialOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentsSequential(options: SetTorrentsSequentialOptions): Promise; /** * Sets tags of torrents * - * @param {SetTorrentsTagsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentsTags(options: SetTorrentsTagsOptions): Promise; /** * Sets trackers of torrents * - * @param {SetTorrentsTrackersOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentsTrackers(options: SetTorrentsTrackersOptions): Promise; /** * Sets priority of contents of a torrent * - * @param {string} hash - Hash of the torrent. - * @param {SetTorrentContentsPropertiesOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param hash - Hash of the torrent. + * @param options - An object of options... + * @return - Rejects with error. */ abstract setTorrentContentsPriority(hash: string, options: SetTorrentContentsPropertiesOptions): Promise; /** * Starts torrents * - * @param {StartTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract startTorrents(options: StartTorrentsOptions): Promise; /** * Stops torrents * - * @param {StopTorrentsOptions} options - An object of options... - * @return {Promise} - Rejects with error. + * @param options - An object of options... + * @return - Rejects with error. */ abstract stopTorrents(options: StopTorrentsOptions): Promise; /** * Fetches the list of torrents * - * @return {Promise} - Resolves with TorrentListSummary or rejects with error. + * @return - Resolves with TorrentListSummary or rejects with error. */ abstract fetchTorrentList(): Promise; /** * Fetches the transfer summary * - * @return {Promise} - Resolves with TransferSummary or rejects with error. + * @return - Resolves with TransferSummary or rejects with error. */ abstract fetchTransferSummary(): Promise; /** * Gets session directory (where .torrent files are stored) of the torrent client * - * @return {Promise<{path: string; case: 'lower' | 'upper'}>} - Resolves with path of session directory or rejects with error. + * @return - Resolves with path of session directory or rejects with error. */ abstract getClientSessionDirectory(): Promise<{path: string; case: 'lower' | 'upper'}>; /** * Gets settings of the torrent client * - * @return {Promise} - Resolves with ClientSettings or rejects with error. + * @return - Resolves with ClientSettings or rejects with error. */ abstract getClientSettings(): Promise; /** * Sets settings of the torrent client * - * @param {SetClientSettingsOptions} - Settings to be set. - * @return {Promise} - Rejects with error. + * @param settings - Settings to be set. + * @return - Rejects with error. */ abstract setClientSettings(settings: SetClientSettingsOptions): Promise;