diff --git a/packages/protocol-echo/src/index.ts b/packages/protocol-echo/src/index.ts index a8df2eac7f..d45def33cf 100644 --- a/packages/protocol-echo/src/index.ts +++ b/packages/protocol-echo/src/index.ts @@ -43,7 +43,7 @@ */ import { Echo as EchoClass } from './echo.js' -import type { ComponentLogger, PeerId } from '@libp2p/interface' +import type { AbortOptions, ComponentLogger, PeerId } from '@libp2p/interface' import type { ConnectionManager, Registrar } from '@libp2p/interface-internal' import type { Multiaddr } from '@multiformats/multiaddr' @@ -62,7 +62,7 @@ export interface EchoComponents { export interface Echo { protocol: string - echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array): Promise + echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array, options?: AbortOptions): Promise } export function echo (init: EchoInit = {}): (components: EchoComponents) => Echo {