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

5
src/pubsub/message/index.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export var rpc: any;
export var td: any;
export var RPC: any;
export var Message: any;
export var SubOpts: any;

View File

@ -6,6 +6,9 @@ const rpcProto = protons(require('./rpc.proto.js'))
const RPC = rpcProto.RPC
const topicDescriptorProto = protons(require('./topic-descriptor.proto.js'))
/**
* @module pubsub/message/index
*/
exports = module.exports
exports.rpc = rpcProto
exports.td = topicDescriptorProto

2
src/pubsub/message/rpc.proto.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare const _exports: string;
export = _exports;

23
src/pubsub/message/sign.d.ts vendored Normal file
View File

@ -0,0 +1,23 @@
/**
* Returns the PublicKey associated with the given message.
* If no, valid PublicKey can be retrieved an error will be returned.
*
* @param {InMessage} message
* @returns {Promise<PublicKey>}
*/
export function messagePublicKey(message: any): Promise<any>;
/**
* Signs the provided message with the given `peerId`
*
* @param {PeerId} peerId
* @param {Message} message
* @returns {Promise<Message>}
*/
export function signMessage(peerId: import("peer-id"), message: any): Promise<any>;
export const SignPrefix: any;
/**
* Verifies the signature of the given message
* @param {InMessage} message
* @returns {Promise<Boolean>}
*/
export function verifySignature(message: any): Promise<boolean>;

View File

@ -0,0 +1,2 @@
declare const _exports: string;
export = _exports;