From 1bd2cc5c3fd763b4c5df87445cb178c68cda7952 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 6 Nov 2024 11:29:15 +0000 Subject: [PATCH] fix: add abort options to echo Adds optional `AbortOptions` to interface, not sure why this wasn't there before. --- packages/protocol-echo/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {