Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type building #8

Open
vojtechsimetka opened this issue Nov 16, 2022 · 0 comments
Open

Fix type building #8

vojtechsimetka opened this issue Nov 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@vojtechsimetka
Copy link
Collaborator

npm run build:types


> [email protected] build:types
> tsc --emitDeclarationOnly --declaration --outDir dist/types

node_modules/libp2p/dist/src/connection-manager/index.d.ts:97:22 - error TS2420: Class 'DefaultConnectionManager' incorrectly implements interface 'ConnectionManager'.
  Type 'DefaultConnectionManager' is missing the following properties from type 'ConnectionManager': acceptIncomingConnection, afterUpgradeInbound

97 export declare class DefaultConnectionManager extends EventEmitter<ConnectionManagerEvents> implements ConnectionManager, Startable, Initializable {
                        ~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/libp2p/dist/src/transport-manager.d.ts:31:5 - error TS2416: Property 'dial' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
  Type '(ma: Multiaddr, options?: AbortOptions | undefined) => Promise<Connection>' is not assignable to type '(ma: Multiaddr, options?: any) => Promise<Connection>'.
    Types of parameters 'ma' and 'ma' are incompatible.
      Property '[inspect]' is missing in type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' but required in type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.

31     dial(ma: Multiaddr, options?: AbortOptions): Promise<Connection>;
       ~~~~

  node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index.d.ts:331:5
    331     [inspect](): string;
            ~~~~~~~~~
    '[inspect]' is declared here.

node_modules/libp2p/dist/src/transport-manager.d.ts:35:5 - error TS2416: Property 'getAddrs' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
  Type '() => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type '() => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
    Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
      Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
        Types of property 'encapsulate' are incompatible.
          Type '(addr: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type '(addr: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src...'.
            Types of parameters 'addr' and 'addr' are incompatible.
              Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput'.
                Type 'Multiaddr' is not assignable to type 'MultiaddrInput'.
                  Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.

35     getAddrs(): Multiaddr[];
       ~~~~~~~~

node_modules/libp2p/dist/src/transport-manager.d.ts:43:5 - error TS2416: Property 'transportForMultiaddr' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
  Type '(ma: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/dist/src/index").Transport | undefined' is not assignable to type '(ma: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/dist/src/index").Transport | undefined'.
    Types of parameters 'ma' and 'ma' are incompatible.
      Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.

43     transportForMultiaddr(ma: Multiaddr): Transport | undefined;
       ~~~~~~~~~~~~~~~~~~~~~

node_modules/libp2p/dist/src/transport-manager.d.ts:47:5 - error TS2416: Property 'listen' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
  Type '(addrs: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]) => Promise<void>' is not assignable to type '(addrs: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]) => Promise<...>'.
    Types of parameters 'addrs' and 'addrs' are incompatible.
      Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
        Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.

47     listen(addrs: Multiaddr[]): Promise<void>;
       ~~~~~~


Found 5 errors in 2 files.

Errors  Files
     1  node_modules/libp2p/dist/src/connection-manager/index.d.ts:97
     4  node_modules/libp2p/dist/src/transport-manager.d.ts:31
@vojtechsimetka vojtechsimetka added the bug Something isn't working label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant