make things work

This commit is contained in:
Pavel Murygin 2022-10-04 23:53:28 +04:00
parent a9021e4c40
commit 9c76cd9413
4 changed files with 4 additions and 2 deletions

View File

@ -142,6 +142,7 @@ export interface ConnectionManagerEvents {
/**
* Responsible for managing known connections.
*/
// @ts-expect-error
export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEvents> implements ConnectionManager, Startable, Initializable {
private components = new Components()
private readonly opts: Required<ConnectionManagerInit>

View File

@ -100,6 +100,7 @@ export class Plaintext implements ConnectionEncrypter {
return await encrypt(localId, conn, remoteId)
}
// @ts-expect-error
async secureOutbound (localId: PeerId, conn: Duplex<Uint8Array>, remoteId: PeerId): Promise<SecuredConnection> {
return await encrypt(localId, conn, remoteId)
}

View File

@ -133,6 +133,7 @@ export class Libp2pNode extends EventEmitter<Libp2pEvents> implements Libp2p {
this.components.setDialer(new DefaultDialer(this.components, init.connectionManager))
// Create the Connection Manager
// @ts-expect-error
this.connectionManager = this.components.setConnectionManager(new DefaultConnectionManager(init.connectionManager))
// Create the Registrar

View File

@ -4,8 +4,7 @@
"outDir": "dist"
},
"include": [
"src",
"test"
"src"
],
"exclude": [
"src/circuit/pb/index.js",