make Msg type generic in msg.data

This commit is contained in:
Andre Staltz 2023-09-14 12:54:01 +03:00
parent 5a405be367
commit 530797317d
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 14 additions and 10 deletions

View File

@ -29,18 +29,11 @@ const { isEmptyObject } = require('./util')
* @typedef {import('ppppp-keypair').Keypair} Keypair
*/
/**
* @typedef {Iterator<Msg> & {values: () => Iterator<Msg>}} MsgIter
*
* @typedef {Buffer | Uint8Array} B4A
*
* @template [T=any]
* @typedef {{
* depth: number;
* prev: Array<string>;
* }} 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<Msg> & {values: () => Iterator<Msg>}} MsgIter
*
* @typedef {Buffer | Uint8Array} B4A
*
* @typedef {{
* depth: number;
* prev: Array<string>;
* }} TangleMetadata
*
* @typedef {{
* action: 'add', add: AccountAdd