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 {import('ppppp-keypair').Keypair} Keypair
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Iterator<Msg> & {values: () => Iterator<Msg>}} MsgIter
|
* @template [T=any]
|
||||||
*
|
|
||||||
* @typedef {Buffer | Uint8Array} B4A
|
|
||||||
*
|
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* depth: number;
|
* data: T;
|
||||||
* prev: Array<string>;
|
|
||||||
* }} TangleMetadata
|
|
||||||
*
|
|
||||||
* @typedef {{
|
|
||||||
* data: any;
|
|
||||||
* metadata: {
|
* metadata: {
|
||||||
* dataHash: string | null;
|
* dataHash: string | null;
|
||||||
* dataSize: number;
|
* dataSize: number;
|
||||||
|
@ -53,6 +46,17 @@ const { isEmptyObject } = require('./util')
|
||||||
* pubkey: string;
|
* pubkey: string;
|
||||||
* sig: string;
|
* sig: string;
|
||||||
* }} Msg
|
* }} Msg
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Iterator<Msg> & {values: () => Iterator<Msg>}} MsgIter
|
||||||
|
*
|
||||||
|
* @typedef {Buffer | Uint8Array} B4A
|
||||||
|
*
|
||||||
|
* @typedef {{
|
||||||
|
* depth: number;
|
||||||
|
* prev: Array<string>;
|
||||||
|
* }} TangleMetadata
|
||||||
*
|
*
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* action: 'add', add: AccountAdd
|
* action: 'add', add: AccountAdd
|
||||||
|
|
Loading…
Reference in New Issue