mirror of https://codeberg.org/pzp/pzp-db.git
make Msg type generic in msg.data
This commit is contained in:
parent
5a405be367
commit
530797317d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue