Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/interfaces

Package Overview
Dependencies
Maintainers
6
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interfaces - npm Package Compare versions

Comparing version 3.0.6 to 3.1.0

5

dist/src/errors.d.ts

@@ -0,1 +1,6 @@

/**
* When this error is thrown it means an operation was aborted,
* usually in response to the `abort` event being emitted by an
* AbortSignal.
*/
export declare class AbortError extends Error {

@@ -2,0 +7,0 @@ readonly code: string;

@@ -0,1 +1,6 @@

/**
* When this error is thrown it means an operation was aborted,
* usually in response to the `abort` event being emitted by an
* AbortSignal.
*/
export class AbortError extends Error {

@@ -2,0 +7,0 @@ constructor(message = 'The operation was aborted') {

@@ -0,4 +1,26 @@

/**
* An object that contains an AbortSignal as
* the optional `signal` property.
*
* @example
*
* ```js
* const controller = new AbortController()
*
* aLongRunningOperation({
* signal: controller.signal
* })
*
* // later
*
* controller.abort()
*/
export interface AbortOptions {
signal?: AbortSignal;
}
/**
* Returns a new type with all fields marked optional.
*
* Borrowed from the tsdef module.
*/
export type RecursivePartial<T> = {

@@ -5,0 +27,0 @@ [P in keyof T]?: T[P] extends Array<infer I> ? Array<RecursivePartial<I>> : T[P] extends (...args: any[]) => any ? T[P] : RecursivePartial<T[P]>;

{
"EventEmitter": "https://libp2p.github.io/js-libp2p-interfaces/classes/_libp2p_interface_transport_compliance_tests._internal_.EventEmitter.html",
"EventCallback": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interface_transport_compliance_tests._internal_.EventCallback.html",
"EventObject": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interface_transport_compliance_tests._internal_.EventObject.html",
"EventHandler": "https://libp2p.github.io/js-libp2p-interfaces/types/_libp2p_interface_transport_compliance_tests._internal_.EventHandler.html",
"AbortOptions": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interfaces.AbortOptions.html",
"Startable": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interface_mocks._internal_.Startable.html",
"RecursivePartial": "https://libp2p.github.io/js-libp2p-interfaces/types/_libp2p_interfaces.RecursivePartial.html"
}

2

package.json
{
"name": "@libp2p/interfaces",
"version": "3.0.6",
"version": "3.1.0",
"description": "Common code shared by the various libp2p interfaces",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

/**
* When this error is thrown it means an operation was aborted,
* usually in response to the `abort` event being emitted by an
* AbortSignal.
*/
export class AbortError extends Error {

@@ -3,0 +8,0 @@ public readonly code: string

/**
* An object that contains an AbortSignal as
* the optional `signal` property.
*
* @example
*
* ```js
* const controller = new AbortController()
*
* aLongRunningOperation({
* signal: controller.signal
* })
*
* // later
*
* controller.abort()
*/
export interface AbortOptions {

@@ -6,5 +23,9 @@ signal?: AbortSignal

// Borrowed from the tsdef module
/**
* Returns a new type with all fields marked optional.
*
* Borrowed from the tsdef module.
*/
export type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends Array<infer I> ? Array<RecursivePartial<I>> : T[P] extends (...args: any[]) => any ? T[P] : RecursivePartial<T[P]>
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc