From: Chris Duncan Date: Mon, 22 Sep 2025 19:51:31 +0000 (-0700) Subject: Fix some JSDoc. X-Git-Tag: v0.10.5~12^2~16 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=29e31223007e47c42b38a15e8078e75c68b3e954;p=libnemo.git Fix some JSDoc. --- diff --git a/src/lib/account/index.ts b/src/lib/account/index.ts index 5019cac..7c780a9 100644 --- a/src/lib/account/index.ts +++ b/src/lib/account/index.ts @@ -240,9 +240,9 @@ export class Account { * Instantiates Account objects from their private keys which are used to * derive public keys and then discarded. * - * @param {string | Uint8Array | KeyPair | (string | Uint8Array | KeyPair)[]} input - Indexes and keys of the accounts + * @param {(string | Uint8Array | KeyPair | (string | Uint8Array | KeyPair)[])} input - Indexes and keys of the accounts * @param {'private'} [type] - Indicates private keys - * @returns {Account | Account[] | Promise} Promise for array of new Account objects + * @returns {(Account | Account[] | Promise)} Promise for array of new Account objects */ static load (input: string | Uint8Array | KeyPair | (string | Uint8Array | KeyPair)[], type?: 'private'): Account | Account[] | Promise { const isInputArray = Array.isArray(input) @@ -261,7 +261,7 @@ export class Account { * A successful response sets the balance, frontier, and representative * properties. * - * @param {Rpc|string|URL} rpc - RPC node information required to call `account_info` + * @param {(Rpc | string | URL)} rpc - RPC node information required to call `account_info` */ async refresh (rpc: Rpc | string | URL): Promise { return await _refresh(this, rpc) diff --git a/src/lib/block.ts b/src/lib/block.ts index 2174456..e5cd617 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -252,7 +252,7 @@ export class Block { * The block must already be signed (see `sign()` for more information). * The block must also have a `work` value. * - * @param {Rpc|string|URL} rpc - RPC node information required to call `process` + * @param {Rpc} rpc - RPC node information required to call `process` * @returns {Promise} Hash of the processed block */ async process (rpc: Rpc): Promise { diff --git a/src/lib/tools.ts b/src/lib/tools.ts index 99b36e1..59ca5d4 100644 --- a/src/lib/tools.ts +++ b/src/lib/tools.ts @@ -153,8 +153,8 @@ export class Tools { * Collects the funds from a specified range of accounts in a wallet and sends * them all to a single recipient address. Hardware wallets are unsupported. * - * @param {Rpc|string|URL} rpc - RPC node information required to refresh accounts, calculate PoW, and process blocks - * @param {(Wallet)} wallet - Wallet from which to sweep funds + * @param {(Rpc | string | URL)} rpc - RPC node information required to refresh accounts, calculate PoW, and process blocks + * @param {Wallet} wallet - Wallet from which to sweep funds * @param {string} recipient - Destination address for all swept funds * @param {number} [from=0] - Starting account index to sweep * @param {number} [to=from] - Ending account index to sweep