mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-06-13 05:51:38 +00:00
fix: tsconfig to generate optionals correctly
This commit is contained in:
14
src/pubsub/index.d.ts
vendored
14
src/pubsub/index.d.ts
vendored
@ -34,9 +34,9 @@ declare class PubsubBaseProtocol {
|
||||
globalSignaturePolicy: {
|
||||
StrictSign: "StrictSign";
|
||||
StrictNoSign: string;
|
||||
};
|
||||
canRelayMessage: boolean;
|
||||
emitSelf: boolean;
|
||||
} | undefined;
|
||||
canRelayMessage: boolean | undefined;
|
||||
emitSelf: boolean | undefined;
|
||||
});
|
||||
log: any;
|
||||
/**
|
||||
@ -285,13 +285,13 @@ declare namespace PubsubBaseProtocol {
|
||||
}
|
||||
type PeerId = import("peer-id");
|
||||
type InMessage = {
|
||||
from?: string;
|
||||
from?: string | undefined;
|
||||
receivedFrom: string;
|
||||
topicIDs: string[];
|
||||
seqno?: Uint8Array;
|
||||
seqno?: Uint8Array | undefined;
|
||||
data: Uint8Array;
|
||||
signature?: Uint8Array;
|
||||
key?: Uint8Array;
|
||||
signature?: Uint8Array | undefined;
|
||||
key?: Uint8Array | undefined;
|
||||
};
|
||||
import PeerStreams = require("./peer-streams");
|
||||
/**
|
||||
|
12
src/pubsub/utils.d.ts
vendored
12
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 unknown>(message: T, peerId?: string): T & {
|
||||
from?: string;
|
||||
peerId?: string;
|
||||
export function normalizeInRpcMessage<T extends Object>(message: T, peerId?: string | undefined): T & {
|
||||
from?: string | undefined;
|
||||
peerId?: string | undefined;
|
||||
};
|
||||
export function normalizeOutRpcMessage<T extends unknown>(message: T): T & {
|
||||
from?: Uint8Array;
|
||||
data?: Uint8Array;
|
||||
export function normalizeOutRpcMessage<T extends Object>(message: T): T & {
|
||||
from?: Uint8Array | undefined;
|
||||
data?: Uint8Array | undefined;
|
||||
};
|
||||
|
Reference in New Issue
Block a user