@libp2p/interfaces
Advanced tools
Comparing version 1.3.15 to 1.3.16
@@ -84,5 +84,5 @@ import type { ConnectionGater, ConnectionProtector } from './connection/index.js'; | ||
getDHT(): DualDHT | undefined; | ||
setPubSub(pubsub: PubSub): PubSub<import("./pubsub/index.js").PubSubEvents>; | ||
setPubSub(pubsub: PubSub): PubSub; | ||
getPubSub(): PubSub | undefined; | ||
} | ||
//# sourceMappingURL=components.d.ts.map |
import type { PeerId } from '../peer-id/index.js'; | ||
import type { Pushable } from 'it-pushable'; | ||
import type { EventEmitter, Startable } from '../index.js'; | ||
import type { EventEmitter, EventHandler, Startable } from '../index.js'; | ||
import type { Stream } from '../connection/index.js'; | ||
@@ -91,3 +91,3 @@ /** | ||
} | ||
export interface PubSub<EventMap = PubSubEvents> extends EventEmitter<EventMap & PubSubEvents>, Startable { | ||
export interface PubSub extends Startable { | ||
globalSignaturePolicy: typeof StrictSign | typeof StrictNoSign; | ||
@@ -101,2 +101,5 @@ multicodecs: string[]; | ||
dispatchEvent: (event: CustomEvent<Uint8Array | Message>) => boolean; | ||
addEventListener: ((type: string, callback: EventHandler<CustomEvent<Message>>, options?: AddEventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback: EventHandler<CustomEvent<SubscriptionChangeData>>, options?: AddEventListenerOptions | boolean) => void); | ||
removeEventListener: ((type: string, callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void); | ||
listenerCount: (type: string) => number; | ||
} | ||
@@ -103,0 +106,0 @@ export interface PeerStreamEvents { |
{ | ||
"name": "@libp2p/interfaces", | ||
"version": "1.3.15", | ||
"version": "1.3.16", | ||
"description": "Interfaces for JS Libp2p", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
import type { PeerId } from '../peer-id/index.js' | ||
import type { Pushable } from 'it-pushable' | ||
import type { EventEmitter, Startable } from '../index.js' | ||
import type { EventEmitter, EventHandler, Startable } from '../index.js' | ||
import type { Stream } from '../connection/index.js' | ||
@@ -109,3 +109,3 @@ | ||
export interface PubSub<EventMap = PubSubEvents> extends EventEmitter<EventMap & PubSubEvents>, Startable { | ||
export interface PubSub extends Startable { | ||
globalSignaturePolicy: typeof StrictSign | typeof StrictNoSign | ||
@@ -121,2 +121,5 @@ multicodecs: string[] | ||
dispatchEvent: (event: CustomEvent<Uint8Array | Message>) => boolean | ||
addEventListener: ((type: string, callback: EventHandler<CustomEvent<Message>>, options?: AddEventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback: EventHandler<CustomEvent<SubscriptionChangeData>>, options?: AddEventListenerOptions | boolean) => void) | ||
removeEventListener: ((type: string, callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void) | ||
listenerCount: (type: string) => number | ||
} | ||
@@ -123,0 +126,0 @@ |
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
1363290
3272