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

Commit

Permalink
fix: add explicit return type to dial (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain authored Jun 27, 2022
1 parent b3c9c80 commit cdb0932
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CreateListenerOptions, DialOptions, symbol, Transport } from '@libp2p/i
import type { Multiaddr } from '@multiformats/multiaddr'
import type { Socket } from 'net'
import type { AbortOptions } from '@libp2p/interfaces'
import type { Connection } from '@libp2p/interface-connection'

const log = logger('libp2p:tcp')

Expand All @@ -23,7 +24,7 @@ export class TCP implements Transport {
return '@libp2p/tcp'
}

async dial (ma: Multiaddr, options: DialOptions) {
async dial (ma: Multiaddr, options: DialOptions): Promise<Connection> {
const socket = await this._connect(ma, options)

// Avoid uncaught errors caused by unstable connections
Expand Down

0 comments on commit cdb0932

Please sign in to comment.