@libp2p/interfaces
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -9,2 +9,6 @@ export interface AbortOptions { | ||
} | ||
export interface Logger { | ||
(...opts: any[]): void; | ||
error: (...opts: any[]) => void; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
/// <reference types="node" /> | ||
import type { EventEmitter } from 'events'; | ||
import type { PeerData } from '../peer-data'; | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { Startable } from '../index.js'; | ||
export interface PeerDiscoveryFactory { | ||
@@ -11,3 +12,3 @@ new (options?: any): PeerDiscovery; | ||
} | ||
export interface PeerDiscovery extends EventEmitter { | ||
export interface PeerDiscovery extends EventEmitter, Startable { | ||
on: (<U extends keyof PeerDiscoveryEvents>(event: U, listener: (event: PeerDiscoveryEvents[U]) => void) => this) & ((event: string, listener: (...args: any[]) => void) => this); | ||
@@ -14,0 +15,0 @@ once: (<U extends keyof PeerDiscoveryEvents>(event: U, listener: (event: PeerDiscoveryEvents[U]) => void) => this) & ((event: string, listener: (...args: any[]) => void) => this); |
{ | ||
"name": "@libp2p/interfaces", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Interfaces for JS Libp2p", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -11,1 +11,6 @@ | ||
} | ||
export interface Logger { | ||
(...opts: any[]): void | ||
error: (...opts: any[]) => void | ||
} |
import type { EventEmitter } from 'events' | ||
import type { PeerData } from '../peer-data' | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { Startable } from '../index.js' | ||
@@ -13,3 +14,4 @@ export interface PeerDiscoveryFactory { | ||
export interface PeerDiscovery extends EventEmitter { | ||
export interface PeerDiscovery extends EventEmitter, Startable { | ||
on: (<U extends keyof PeerDiscoveryEvents> (event: U, listener: (event: PeerDiscoveryEvents[U]) => void) => this) & | ||
@@ -16,0 +18,0 @@ ((event: string, listener: (...args: any[]) => void) => this) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1278297
1464