No more tsc error on prod code

This commit is contained in:
Franck Royer 2022-06-22 16:05:32 +10:00
parent 5d8ab6cf82
commit dcb3a65a5b
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

View File

@ -1,6 +1,5 @@
import { Noise } from "@chainsafe/libp2p-noise";
import type { PeerId } from "@libp2p/interface-peer-id";
import { MuxedStream } from "@libp2p/interfaces/stream-muxer/types";
import { Mplex } from "@libp2p/mplex";
import { peerIdFromString } from "@libp2p/peer-id";
import { WebSockets } from "@libp2p/websockets";
@ -179,13 +178,9 @@ export class Waku {
* @param peer The peer to dial
* @param protocols Waku protocols we expect from the peer; Default to Relay
*/
async dial(
peer: PeerId | Multiaddr,
protocols?: Protocols[]
): Promise<{
stream: MuxedStream;
protocol: string;
}> {
// TODO: Any to be removed once libp2p uses @libp2p/interface-connection for
// dialProtocol
async dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<any> {
const _protocols = protocols ?? [Protocols.Relay];
const codecs: string[] = [];