diff --git a/lib/msg-v3/index.js b/lib/msg-v3/index.js index 2c66f9c..b9c94be 100644 --- a/lib/msg-v3/index.js +++ b/lib/msg-v3/index.js @@ -29,18 +29,11 @@ const { isEmptyObject } = require('./util') * @typedef {import('ppppp-keypair').Keypair} Keypair */ + /** - * @typedef {Iterator & {values: () => Iterator}} MsgIter - * - * @typedef {Buffer | Uint8Array} B4A - * + * @template [T=any] * @typedef {{ - * depth: number; - * prev: Array; - * }} TangleMetadata - * - * @typedef {{ - * data: any; + * data: T; * metadata: { * dataHash: string | null; * dataSize: number; @@ -53,6 +46,17 @@ const { isEmptyObject } = require('./util') * pubkey: string; * sig: string; * }} Msg + */ + +/** + * @typedef {Iterator & {values: () => Iterator}} MsgIter + * + * @typedef {Buffer | Uint8Array} B4A + * + * @typedef {{ + * depth: number; + * prev: Array; + * }} TangleMetadata * * @typedef {{ * action: 'add', add: AccountAdd