@libp2p/interfaces
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -16,5 +16,3 @@ export interface EventCallback<EventType> { | ||
*/ | ||
export declare class EventEmitter<EventMap extends { | ||
[s: string]: any; | ||
}> extends EventTarget { | ||
export declare class EventEmitter<EventMap extends Record<string, any>> extends EventTarget { | ||
#private; | ||
@@ -21,0 +19,0 @@ listenerCount(type: string): number; |
{ | ||
"name": "@libp2p/interfaces", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "Common code shared by the various libp2p interfaces", | ||
@@ -163,3 +163,3 @@ "license": "Apache-2.0 OR MIT", | ||
"devDependencies": { | ||
"aegir": "^37.9.0" | ||
"aegir": "^38.1.0" | ||
}, | ||
@@ -166,0 +166,0 @@ "typedoc": { |
@@ -20,3 +20,3 @@ # @libp2p/interfaces <!-- omit in toc --> | ||
- [License](#license) | ||
- [Contribute](#contribute) | ||
- [Contribution](#contribution) | ||
@@ -100,4 +100,4 @@ ## Install | ||
## Contribute | ||
## Contribution | ||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. |
@@ -17,7 +17,7 @@ | ||
static get code () { | ||
static get code (): string { | ||
return 'ABORT_ERR' | ||
} | ||
static get type () { | ||
static get type (): string { | ||
return 'aborted' | ||
@@ -24,0 +24,0 @@ } |
@@ -19,6 +19,6 @@ | ||
*/ | ||
export class EventEmitter<EventMap extends { [s: string]: any }> extends EventTarget { | ||
export class EventEmitter<EventMap extends Record<string, any>> extends EventTarget { | ||
#listeners: Map<any, Listener[]> = new Map() | ||
listenerCount (type: string) { | ||
listenerCount (type: string): number { | ||
const listeners = this.#listeners.get(type) | ||
@@ -25,0 +25,0 @@ |
@@ -55,3 +55,3 @@ | ||
export async function start (...objs: any[]) { | ||
export async function start (...objs: any[]): Promise<void> { | ||
const startables: Startable[] = [] | ||
@@ -88,3 +88,3 @@ | ||
export async function stop (...objs: any[]) { | ||
export async function stop (...objs: any[]): Promise<void> { | ||
const startables: Startable[] = [] | ||
@@ -91,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
32308
515