This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update dial function return type to avoid Connection import issue (
#171) - I've noticed an issue when including this package in another typescript project. The `index.d.ts` file created during the build process would include an in-line import in the `dial` function declaration of `Promise<import("@libp2p/interface-connection/dist/src").Connection>;` - This would result in the following build error in my project: `../../node_modules/@libp2p/websockets/dist/src/index.d.ts(19,104): error TS2694: Namespace '"@libp2p/interface-connection/dist/src"' has no exported member 'Connection'.` - By declaring the `Connection` import explicitly, we avoid the strange in-line import of a `dist/src` location and I am able to build my project correctly. I believe it is possible that this issue: #163 is also the result of the behavior I was seeing, and this PR may resolve that issue.
- Loading branch information