Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit cdb0932

Browse files
authored
fix: add explicit return type to dial (#191)
1 parent b3c9c80 commit cdb0932

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { CreateListenerOptions, DialOptions, symbol, Transport } from '@libp2p/i
1111
import type { Multiaddr } from '@multiformats/multiaddr'
1212
import type { Socket } from 'net'
1313
import type { AbortOptions } from '@libp2p/interfaces'
14+
import type { Connection } from '@libp2p/interface-connection'
1415

1516
const log = logger('libp2p:tcp')
1617

@@ -23,7 +24,7 @@ export class TCP implements Transport {
2324
return '@libp2p/tcp'
2425
}
2526

26-
async dial (ma: Multiaddr, options: DialOptions) {
27+
async dial (ma: Multiaddr, options: DialOptions): Promise<Connection> {
2728
const socket = await this._connect(ma, options)
2829

2930
// Avoid uncaught errors caused by unstable connections

0 commit comments

Comments
 (0)