mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-06-13 04:41:29 +00:00
fix: optional fields
This commit is contained in:
4
src/pubsub/utils.d.ts
vendored
4
src/pubsub/utils.d.ts
vendored
@ -3,11 +3,11 @@ export function msgId(from: string, seqno: Uint8Array): Uint8Array;
|
||||
export function noSignMsgId(data: Uint8Array): Uint8Array;
|
||||
export function anyMatch(a: Set<any> | any[], b: Set<any> | any[]): boolean;
|
||||
export function ensureArray<T>(maybeArray: T | T[]): T[];
|
||||
export function normalizeInRpcMessage<T extends Object>(message: T, peerId?: string | undefined): T & {
|
||||
export function normalizeInRpcMessage<T extends unknown>(message: T, peerId?: string | undefined): T & {
|
||||
from?: string | undefined;
|
||||
peerId?: string | undefined;
|
||||
};
|
||||
export function normalizeOutRpcMessage<T extends Object>(message: T): T & {
|
||||
export function normalizeOutRpcMessage<T extends unknown>(message: T): T & {
|
||||
from?: Uint8Array | undefined;
|
||||
data?: Uint8Array | undefined;
|
||||
};
|
||||
|
Reference in New Issue
Block a user