Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Created August 31, 2022 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliangruber/eddb2e9fbc1c96a5f935170c4336d9b5 to your computer and use it in GitHub Desktop.
Save juliangruber/eddb2e9fbc1c96a5f935170c4336d9b5 to your computer and use it in GitHub Desktop.
$ npm run build
> libp2p@0.38.0 build
> aegir build
[08:47:41] tsc [started]
src/circuit/auto-relay.ts:54:80 - error TS2345: Argument of type '(evt: CustomEvent<Connection>) => void' is not assignable to parameter of type 'EventHandler<CustomEvent<Connection>> | null'.
Type '(evt: CustomEvent<Connection>) => void' is not assignable to type 'EventCallback<CustomEvent<Connection>>'.
Types of parameters 'evt' and 'evt' are incompatible.
Type 'CustomEvent<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection>' is not assignable to type 'CustomEvent<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection>'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
54 this.components.getConnectionManager().addEventListener('peer:disconnect', this._onPeerDisconnected)
~~~~~~~~~~~~~~~~~~~~~~~~
src/circuit/auto-relay.ts:102:42 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
102 const supportsHop = await canHop({ connection })
~~~~~~~~~~
src/circuit/circuit/hop.ts:166:3
166 connection: Connection
~~~~~~~~~~
The expected type comes from property 'connection' which is declared here on type 'CanHopOptions'
src/circuit/auto-relay.ts:106:36 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
106 await this._addListenRelay(connection, id)
~~~~~~~~~~
src/circuit/auto-relay.ts:236:34 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
236 await this._addListenRelay(connections[0], idStr)
~~~~~~~~~~~~~~
src/circuit/auto-relay.ts:280:34 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
280 await this._addListenRelay(connection, peerId.toString())
~~~~~~~~~~
src/circuit/circuit/hop.ts:92:7 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
Types of property 'streams' are incompatible.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream[]' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream[]'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream'.
Types of property 'source' are incompatible.
Type 'Source<Uint8Array>' is not assignable to type 'Source<Uint8ArrayList>'.
Type 'AsyncIterable<Uint8Array>' is not assignable to type 'Source<Uint8ArrayList>'.
Type 'AsyncIterable<Uint8Array>' is not assignable to type 'AsyncIterable<Uint8ArrayList>'.
Type 'Uint8Array' is missing the following properties from type 'Uint8ArrayList': bufs, append, appendAll, prepend, and 27 more.
92 connection: destinationConnections[0],
~~~~~~~~~~
src/circuit/circuit/stop.ts:48:3
48 connection: Connection
~~~~~~~~~~
The expected type comes from property 'connection' which is declared here on type 'StopOptions'
src/circuit/transport.ts:192:9 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
192 connection: relayConnection,
~~~~~~~~~~
src/circuit/circuit/hop.ts:124:3
124 connection: Connection
~~~~~~~~~~
The expected type comes from property 'connection' which is declared here on type 'HopConfig'
src/connection-manager/index.ts:492:3 - error TS2416: Property 'getConnections' in type 'DefaultConnectionManager' is not assignable to the same property in base type 'ConnectionManager'.
Type '(peerId?: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-peer-id/dist/src/index").PeerId | undefined) => import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]' is not assignable to type '(peerId?: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-peer-id/dist/src/index").PeerId | undefined) => import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
Types of property 'streams' are incompatible.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream[]' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream[]'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream'.
Types of property 'source' are incompatible.
Type 'Source<Uint8ArrayList>' is not assignable to type 'Source<Uint8Array>'.
Type 'AsyncIterable<Uint8ArrayList>' is not assignable to type 'Source<Uint8Array>'.
Type 'AsyncIterable<Uint8ArrayList>' is not assignable to type 'AsyncIterable<Uint8Array>'.
Type 'Uint8ArrayList' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteOffset, copyWithin, and 21 more.
492 getConnections (peerId?: PeerId): Connection[] {
~~~~~~~~~~~~~~
src/connection-manager/index.ts:506:9 - error TS2416: Property 'openConnection' in type 'DefaultConnectionManager' is not assignable to the same property in base type 'ConnectionManager'.
Type '(peerId: PeerId, options?: AbortOptions) => Promise<Connection>' is not assignable to type '(peer: PeerId, options?: AbortOptions | undefined) => Promise<Connection>'.
Type 'Promise<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection>' is not assignable to type 'Promise<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection>'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
506 async openConnection (peerId: PeerId, options: AbortOptions = {}): Promise<Connection> {
~~~~~~~~~~~~~~
src/fetch/index.ts:111:7 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream'.
111 stream = await connection.newStream([this.protocol], {
~~~~~~
src/fetch/index.ts:116:38 - error TS2345: Argument of type 'Stream | undefined' is not assignable to parameter of type 'Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array, Promise<void>>'.
Type 'undefined' is not assignable to type 'Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array, Promise<void>>'.
116 const source = abortableDuplex(stream, signal)
~~~~~~
src/fetch/index.ts:201:7 - error TS2345: Argument of type 'Stream' is not assignable to parameter of type 'Sink<Uint8Array, Promise<void>>'.
Type 'Stream' is not assignable to type 'Duplex<Uint8Array, any, Promise<void>>'.
Types of property 'source' are incompatible.
Type 'Source<Uint8ArrayList>' is not assignable to type 'Source<Uint8Array>'.
201 stream
~~~~~~
src/identify/index.ts:97:21 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
97 this.identify(connection).catch(log.error)
~~~~~~~~~~
src/identify/index.ts:227:24 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
227 connections.push(conn)
~~~~
src/libp2p.ts:132:67 - error TS2345: Argument of type 'DefaultConnectionManager' is not assignable to parameter of type 'ConnectionManager'.
Types of property 'getConnections' are incompatible.
Type '(peerId?: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-peer-id/dist/src/index").PeerId | undefined) => import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]' is not assignable to type '(peerId?: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-peer-id/dist/src/index").PeerId | undefined) => import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]'.
132 this.connectionManager = this.components.setConnectionManager(new DefaultConnectionManager(init.connectionManager))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/libp2p.ts:360:5 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection[]'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
360 return this.components.getConnectionManager().getConnections(peerId)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/libp2p.ts:378:5 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
378 return await this.components.getConnectionManager().openConnection(id, options)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ping/index.ts:102:7 - error TS2322: Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Stream' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Stream'.
102 stream = await connection.newStream([this.protocol], {
~~~~~~
src/ping/index.ts:107:38 - error TS2345: Argument of type 'Stream | undefined' is not assignable to parameter of type 'Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array, Promise<void>>'.
Type 'undefined' is not assignable to type 'Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array, Promise<void>>'.
107 const source = abortableDuplex(stream, signal)
~~~~~~
src/registrar.ts:32:80 - error TS2345: Argument of type '(evt: CustomEvent<Connection>) => void' is not assignable to parameter of type 'EventHandler<CustomEvent<Connection>> | null'.
Type '(evt: CustomEvent<Connection>) => void' is not assignable to type 'EventCallback<CustomEvent<Connection>>'.
Types of parameters 'evt' and 'evt' are incompatible.
Type 'CustomEvent<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection>' is not assignable to type 'CustomEvent<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection>'.
32 this.components.getConnectionManager().addEventListener('peer:disconnect', this._onDisconnect)
~~~~~~~~~~~~~~~~~~
src/registrar.ts:209:36 - error TS2345: Argument of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to parameter of type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
209 topology.onConnect(peerId, connection)
~~~~~~~~~~
test/addresses/utils.ts:7:5 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
7 new TCP(),
~~~~~~~~~
test/configuration/utils.ts:33:3 - error TS2416: Property 'encodeRpc' in type 'MockPubSub' is not assignable to the same property in base type 'PubSubBaseProtocol<PubSubEvents>'.
Type '(rpc: PubSubRPC) => Uint8Array' is not assignable to type '(rpc: PubSubRPC) => Uint8ArrayList'.
Type 'Uint8Array' is not assignable to type 'Uint8ArrayList'.
33 encodeRpc (rpc: PubSubRPC): Uint8Array {
~~~~~~~~~
test/configuration/utils.ts:41:3 - error TS2416: Property 'encodeMessage' in type 'MockPubSub' is not assignable to the same property in base type 'PubSubBaseProtocol<PubSubEvents>'.
Type '(rpc: PubSubRPCMessage) => Uint8Array' is not assignable to type '(rpc: PubSubRPCMessage) => Uint8ArrayList'.
Type 'Uint8Array' is not assignable to type 'Uint8ArrayList'.
41 encodeMessage (rpc: PubSubRPCMessage): Uint8Array {
~~~~~~~~~~~~~
test/connection-manager/index.spec.ts:32:27 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
32 const spy = sinon.spy(libp2p.components.getConnectionManager() as DefaultConnectionManager, 'start')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/connection-manager/index.spec.ts:49:27 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
49 const spy = sinon.spy(libp2p.components.getConnectionManager() as DefaultConnectionManager, 'start')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/connection-manager/index.spec.ts:70:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
70 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/connection-manager/index.spec.ts:120:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
120 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/connection-manager/index.spec.ts:155:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
155 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/core/listening.node.ts:31:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
The types returned by 'dial(...)' are incompatible between these types.
Type 'Promise<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection>' is not assignable to type 'Promise<import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection>'.
Type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection-manager/node_modules/@libp2p/interface-connection/dist/src/index").Connection' is not assignable to type 'import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-connection/dist/src/index").Connection'.
31 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:65:18 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
Types of property 'dial' are incompatible.
Type '(ma: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr, options: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-transport/dist/src/index").DialOptions) => Promise<...>' is not assignable to type '(ma: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr, options: import("/Users/julian/dev/libp2p/js-libp2p/node_modules/@libp2p/interface-transport/dist/src/index").DialOptions) => Promise<...>'. Two different types with this name exist, but they are unrelated.
65 remoteTM.add(new TCP())
~~~~~~~~~
test/dialing/direct.node.ts:74:42 - error TS2345: Argument of type 'DefaultConnectionManager' is not assignable to parameter of type 'ConnectionManager'.
74 localComponents.setConnectionManager(new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75 maxConnections: 100,
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
78 inboundUpgradeTimeout: 1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79 }))
~~~~~~
test/dialing/direct.node.ts:82:17 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
82 localTM.add(new TCP())
~~~~~~~~~
test/dialing/direct.node.ts:242:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
242 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:275:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
275 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:295:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
295 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:322:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
322 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:351:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
351 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:415:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
415 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:441:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
441 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:464:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
464 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:502:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
502 new TCP()
~~~~~~~~~
test/dialing/direct.node.ts:538:9 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
538 new TCP()
~~~~~~~~~
test/dialing/direct.spec.ts:52:42 - error TS2345: Argument of type 'DefaultConnectionManager' is not assignable to parameter of type 'ConnectionManager'.
52 localComponents.setConnectionManager(new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53 maxConnections: 100,
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
56 inboundUpgradeTimeout: 1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 }))
~~~~~~
test/dialing/direct.spec.ts:367:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type 'ConnectionManager' is missing the following properties from type 'DefaultConnectionManager': dialer, components, opts, connections, and 19 more.
367 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/dialing/direct.spec.ts:398:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
398 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/dialing/direct.spec.ts:423:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
423 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/dialing/direct.spec.ts:546:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
546 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/dialing/direct.spec.ts:585:31 - error TS2352: Conversion of type 'ConnectionManager' to type 'DefaultConnectionManager' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
585 const connectionManager = libp2p.components.getConnectionManager() as DefaultConnectionManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/fetch/fetch.node.ts:19:7 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
19 new TCP()
~~~~~~~~~
test/fetch/index.spec.ts:35:5 - error TS2322: Type 'DefaultConnectionManager' is not assignable to type 'ConnectionManager'.
35 connectionManager: new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~
test/identify/index.spec.ts:59:5 - error TS2322: Type 'DefaultConnectionManager' is not assignable to type 'ConnectionManager'.
59 connectionManager: new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~
test/identify/index.spec.ts:256:9 - error TS2345: Argument of type '(source: Source<Uint8ArrayList>) => AsyncGenerator<Uint8Array, void, any>' is not assignable to parameter of type 'Transform<Uint8ArrayList, Uint8ArrayList>'.
Type '(source: Source<Uint8ArrayList>) => AsyncGenerator<Uint8Array, void, any>' is not assignable to type 'Transform<Uint8ArrayList, Uint8ArrayList>'.
Type 'AsyncGenerator<Uint8Array, void, any>' is not assignable to type 'Source<Uint8ArrayList>'.
Type 'AsyncGenerator<Uint8Array, void, any>' is not assignable to type 'AsyncIterable<Uint8ArrayList>'.
The types returned by '[Symbol.asyncIterator]().next(...)' are incompatible between these types.
Type 'Promise<IteratorResult<Uint8Array, void>>' is not assignable to type 'Promise<IteratorResult<Uint8ArrayList, any>>'.
Type 'IteratorResult<Uint8Array, void>' is not assignable to type 'IteratorResult<Uint8ArrayList, any>'.
Type 'IteratorYieldResult<Uint8Array>' is not assignable to type 'IteratorResult<Uint8ArrayList, any>'.
Type 'IteratorYieldResult<Uint8Array>' is not assignable to type 'IteratorYieldResult<Uint8ArrayList>'.
Type 'Uint8Array' is not assignable to type 'Uint8ArrayList'.
256 async function * (source) {
~~~~~
test/identify/push.spec.ts:54:5 - error TS2322: Type 'DefaultConnectionManager' is not assignable to type 'ConnectionManager'.
54 connectionManager: new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~
test/identify/push.spec.ts:198:9 - error TS2345: Argument of type '(source: Source<Uint8ArrayList>) => AsyncGenerator<Uint8Array, void, any>' is not assignable to parameter of type 'Transform<Uint8ArrayList, Uint8ArrayList>'.
Type '(source: Source<Uint8ArrayList>) => AsyncGenerator<Uint8Array, void, any>' is not assignable to type 'Transform<Uint8ArrayList, Uint8ArrayList>'.
Type 'AsyncGenerator<Uint8Array, void, any>' is not assignable to type 'Source<Uint8ArrayList>'.
198 async function * (source) {
~~~~~
test/interop.ts:95:18 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
95 transports: [new TCP()],
~~~~~~~~~
test/nat-manager/nat-manager.node.ts:49:42 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
49 components.getTransportManager().add(new TCP())
~~~~~~~~~
test/ping/index.spec.ts:35:5 - error TS2322: Type 'DefaultConnectionManager' is not assignable to type 'ConnectionManager'.
35 connectionManager: new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~
test/registrar/registrar.spec.ts:43:9 - error TS2322: Type 'DefaultConnectionManager' is not assignable to type 'ConnectionManager'.
43 connectionManager: new DefaultConnectionManager({
~~~~~~~~~~~~~~~~~
test/transports/transport-manager.node.ts:55:12 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
55 tm.add(new TCP())
~~~~~~~~~
test/transports/transport-manager.node.ts:66:12 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
66 tm.add(transport)
~~~~~~~~~
test/transports/transport-manager.node.ts:86:12 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
86 tm.add(new TCP())
~~~~~~~~~
test/transports/transport-manager.node.ts:108:12 - error TS2345: Argument of type 'TCP' is not assignable to parameter of type 'Transport'.
108 tm.add(new TCP())
~~~~~~~~~
test/utils/base-options.ts:10:7 - error TS2322: Type 'TCP' is not assignable to type 'RecursivePartial<Transport>'.
10 new TCP()
~~~~~~~~~
Found 64 errors in 25 files.
Errors Files
5 src/circuit/auto-relay.ts:54
1 src/circuit/circuit/hop.ts:92
1 src/circuit/transport.ts:192
2 src/connection-manager/index.ts:492
3 src/fetch/index.ts:111
2 src/identify/index.ts:97
3 src/libp2p.ts:132
2 src/ping/index.ts:102
2 src/registrar.ts:32
1 test/addresses/utils.ts:7
2 test/configuration/utils.ts:33
5 test/connection-manager/index.spec.ts:32
1 test/core/listening.node.ts:31
13 test/dialing/direct.node.ts:65
6 test/dialing/direct.spec.ts:52
1 test/fetch/fetch.node.ts:19
1 test/fetch/index.spec.ts:35
2 test/identify/index.spec.ts:59
2 test/identify/push.spec.ts:54
1 test/interop.ts:95
1 test/nat-manager/nat-manager.node.ts:49
1 test/ping/index.spec.ts:35
1 test/registrar/registrar.spec.ts:43
4 test/transports/transport-manager.node.ts:55
1 test/utils/base-options.ts:10
[08:47:45] tsc [failed]
[08:47:45] → Command failed with exit code 1: tsc
Command failed with exit code 1: tsc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment