chore: add type generation from jsdoc (#64)

This commit is contained in:
Marin Petrunić
2020-09-30 11:21:11 +02:00
committed by GitHub
parent c43e8e26bd
commit eacdc246da
27 changed files with 851 additions and 20 deletions

23
src/record/index.d.ts vendored Normal file
View File

@ -0,0 +1,23 @@
export = Record;
/**
* Record is the base implementation of a record that can be used as the payload of a libp2p envelope.
*/
declare class Record {
/**
* @constructor
* @param {String} domain signature domain
* @param {Uint8Array} codec identifier of the type of record
*/
constructor(domain: string, codec: Uint8Array);
domain: string;
codec: Uint8Array;
/**
* Marshal a record to be used in an envelope.
*/
marshal(): void;
/**
* Verifies if the other provided Record is identical to this one.
* @param {Record} other
*/
equals(other: Record): void;
}