]> git.codecow.com Git - libnemo.git/commitdiff
Fix some JSDoc.
authorChris Duncan <chris@zoso.dev>
Mon, 22 Sep 2025 19:51:31 +0000 (12:51 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 22 Sep 2025 19:51:31 +0000 (12:51 -0700)
src/lib/account/index.ts
src/lib/block.ts
src/lib/tools.ts

index 5019cac36c5dd9260187619a4de934c9bb08bcdd..7c780a962e0655540c521a1f003491d6080b360e 100644 (file)
@@ -240,9 +240,9 @@ export class Account {
        * Instantiates Account objects from their private keys which are used to\r
        * derive public keys and then discarded.\r
        *\r
-       * @param {string | Uint8Array<ArrayBuffer> | KeyPair | (string | Uint8Array<ArrayBuffer> | KeyPair)[]} input - Indexes and keys of the accounts\r
+       * @param {(string | Uint8Array<ArrayBuffer> | KeyPair | (string | Uint8Array<ArrayBuffer> | KeyPair)[])} input - Indexes and keys of the accounts\r
        * @param {'private'} [type] - Indicates private keys\r
-       * @returns {Account | Account[] | Promise<Account | Account[]>} Promise for array of new Account objects\r
+       * @returns {(Account | Account[] | Promise<Account | Account[]>)} Promise for array of new Account objects\r
        */\r
        static load (input: string | Uint8Array<ArrayBuffer> | KeyPair | (string | Uint8Array<ArrayBuffer> | KeyPair)[], type?: 'private'): Account | Account[] | Promise<Account | Account[]> {\r
                const isInputArray = Array.isArray(input)\r
@@ -261,7 +261,7 @@ export class Account {
        * A successful response sets the balance, frontier, and representative\r
        * properties.\r
        *\r
-       * @param {Rpc|string|URL} rpc - RPC node information required to call `account_info`\r
+       * @param {(Rpc | string | URL)} rpc - RPC node information required to call `account_info`\r
        */\r
        async refresh (rpc: Rpc | string | URL): Promise<void> {\r
                return await _refresh(this, rpc)\r
index 2174456dcbaec05fc8cf9b1ee39d002b3fa7d2ef..e5cd617b9d0677b7dc3cc5d47b8d7aaef9fbe9f7 100644 (file)
@@ -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<string>} Hash of the processed block
        */
        async process (rpc: Rpc): Promise<string> {
index 99b36e137c9fffce20c64c1b12beb3f1770cebe9..59ca5d4659dc728c17bc0afd8f07d27e2895e2d6 100644 (file)
@@ -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