diff --git a/packages/kad-dht/src/providers.ts b/packages/kad-dht/src/providers.ts index 8f8381de20..c90180edff 100644 --- a/packages/kad-dht/src/providers.ts +++ b/packages/kad-dht/src/providers.ts @@ -53,7 +53,7 @@ export class Providers implements Startable { private readonly provideValidity: number private readonly syncQueue: Queue private started: boolean - private cleaner?: NodeJS.Timer + private cleaner?: ReturnType constructor (components: ProvidersComponents, init: ProvidersInit = {}) { const { cacheSize, cleanupInterval, provideValidity } = init diff --git a/packages/kad-dht/src/query-self.ts b/packages/kad-dht/src/query-self.ts index a6daa8c3a4..49f3826dbd 100644 --- a/packages/kad-dht/src/query-self.ts +++ b/packages/kad-dht/src/query-self.ts @@ -41,7 +41,7 @@ export class QuerySelf implements Startable { private readonly initialInterval: number private readonly queryTimeout: number private started: boolean - private timeoutId?: NodeJS.Timer + private timeoutId?: ReturnType private controller?: AbortController private initialQuerySelfHasRun?: DeferredPromise private querySelfPromise?: DeferredPromise diff --git a/packages/kad-dht/src/routing-table/refresh.ts b/packages/kad-dht/src/routing-table/refresh.ts index f163317af7..242253ee54 100644 --- a/packages/kad-dht/src/routing-table/refresh.ts +++ b/packages/kad-dht/src/routing-table/refresh.ts @@ -35,7 +35,7 @@ export class RoutingTableRefresh { private readonly refreshInterval: number private readonly refreshQueryTimeout: number private readonly commonPrefixLengthRefreshedAt: Date[] - private refreshTimeoutId?: NodeJS.Timer + private refreshTimeoutId?: ReturnType constructor (init: RoutingTableRefreshInit) { const { peerRouting, routingTable, refreshInterval, refreshQueryTimeout, lan } = init diff --git a/packages/peer-discovery-mdns/src/query.ts b/packages/peer-discovery-mdns/src/query.ts index f1ae075a82..2bc97b262c 100644 --- a/packages/peer-discovery-mdns/src/query.ts +++ b/packages/peer-discovery-mdns/src/query.ts @@ -7,7 +7,7 @@ import type { MulticastDNS, QueryPacket, ResponsePacket } from 'multicast-dns' const log = logger('libp2p:mdns:query') -export function queryLAN (mdns: MulticastDNS, serviceTag: string, interval: number): NodeJS.Timer { +export function queryLAN (mdns: MulticastDNS, serviceTag: string, interval: number): ReturnType { const query = (): void => { log('query', serviceTag)