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

@types/bluebird

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/bluebird - npm Package Compare versions

Comparing version 3.5.18 to 3.5.19

262

bluebird/index.d.ts

@@ -38,2 +38,4 @@ // Type definitions for bluebird 3.5

type CatchFilter<E> = (new (...args: any[]) => E) | ((error: E) => boolean) | (object & E);
declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {

@@ -81,124 +83,65 @@ /**

*/
catch<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
filter5: (new (...args: any[]) => E5),
onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike<R>,
): Bluebird<R>;
catch<E1, E2, E3, E4, E5>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter5: ((error: E5) => boolean) | (E5 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
filter4: CatchFilter<E4>,
filter5: CatchFilter<E5>,
onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike<R>,
): Bluebird<R>;
catch<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
filter5: (new (...args: any[]) => E5),
onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<U, E1, E2, E3, E4, E5>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter5: ((error: E5) => boolean) | (E5 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
filter4: CatchFilter<E4>,
filter5: CatchFilter<E5>,
onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike<R>,
): Bluebird<R>;
catch<E1, E2, E3, E4>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
filter4: CatchFilter<E4>,
onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike<R>,
): Bluebird<R>;
catch<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<U, E1, E2, E3, E4>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
filter4: CatchFilter<E4>,
onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
onReject: (error: E1 | E2 | E3) => R | PromiseLike<R>,
): Bluebird<R>;
catch<E1, E2, E3>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
onReject: (error: E1 | E2 | E3) => R | PromiseLike<R>,
): Bluebird<R>;
catch<U, E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
onReject: (error: E1 | E2 | E3) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<U, E1, E2, E3>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
filter3: CatchFilter<E3>,
onReject: (error: E1 | E2 | E3) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
onReject: (error: E1 | E2) => R | PromiseLike<R>,
): Bluebird<R>;
catch<E1, E2>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
onReject: (error: E1 | E2) => R | PromiseLike<R>,
): Bluebird<R>;
catch<U, E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
onReject: (error: E1 | E2) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<U, E1, E2>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter1: CatchFilter<E1>,
filter2: CatchFilter<E2>,
onReject: (error: E1 | E2) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<E1 extends Error>(
filter1: (new (...args: any[]) => E1),
onReject: (error: E1) => R | PromiseLike<R>,
): Bluebird<R>;
catch<E1>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter1: CatchFilter<E1>,
onReject: (error: E1) => R | PromiseLike<R>,
): Bluebird<R>;
catch<U, E1 extends Error>(
filter1: (new (...args: any[]) => E1),
onReject: (error: E1) => U | PromiseLike<U>,
): Bluebird<U | R>;
catch<U, E1>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter1: CatchFilter<E1>,
onReject: (error: E1) => U | PromiseLike<U>,

@@ -214,142 +157,5 @@ ): Bluebird<U | R>;

*/
caught(onReject: (error: any) => R | PromiseLike<R>): Bluebird<R>;
caught<U>(onReject: ((error: any) => U | PromiseLike<U>) | undefined | null): Bluebird<U | R>;
caught: Bluebird<R>["catch"];
/**
* This extends `.catch` to work more like catch-clauses in languages like Java or C#.
*
* Instead of manually checking `instanceof` or `.name === "SomeError"`, you may specify a number of error constructors which are eligible for this catch handler.
* The catch handler that is first met that has eligible constructors specified, is the one that will be called.
*
* This method also supports predicate-based filters. If you pass a predicate function instead of an error constructor, the predicate will receive the error as an argument.
* The return result of the predicate will be used determine whether the error handler should be called.
*
* Alias `.caught();` for compatibility with earlier ECMAScript version.
*/
caught<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
filter5: (new (...args: any[]) => E5),
onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike<R>,
): Bluebird<R>;
caught<E1, E2, E3, E4, E5>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter5: ((error: E5) => boolean) | (E5 & object),
onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike<R>,
): Bluebird<R>;
caught<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
filter5: (new (...args: any[]) => E5),
onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<U, E1, E2, E3, E4, E5>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
filter5: ((error: E5) => boolean) | (E5 & object),
onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike<R>,
): Bluebird<R>;
caught<E1, E2, E3, E4>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
onReject: (error: E1 | E2 | E3 | E4) => R | PromiseLike<R>,
): Bluebird<R>;
caught<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
filter4: (new (...args: any[]) => E4),
onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<U, E1, E2, E3, E4>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
filter4: ((error: E4) => boolean) | (E4 & object),
onReject: (error: E1 | E2 | E3 | E4) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
onReject: (error: E1 | E2 | E3) => R | PromiseLike<R>,
): Bluebird<R>;
caught<E1, E2, E3>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
onReject: (error: E1 | E2 | E3) => R | PromiseLike<R>,
): Bluebird<R>;
caught<U, E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
filter3: (new (...args: any[]) => E3),
onReject: (error: E1 | E2 | E3) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<U, E1, E2, E3>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
filter3: ((error: E3) => boolean) | (E3 & object),
onReject: (error: E1 | E2 | E3) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
onReject: (error: E1 | E2) => R | PromiseLike<R>,
): Bluebird<R>;
caught<E1, E2>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
onReject: (error: E1 | E2) => R | PromiseLike<R>,
): Bluebird<R>;
caught<U, E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1),
filter2: (new (...args: any[]) => E2),
onReject: (error: E1 | E2) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<U, E1, E2>(
filter1: ((error: E1) => boolean) | (E1 & object),
filter2: ((error: E2) => boolean) | (E2 & object),
onReject: (error: E1 | E2) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<E1 extends Error>(
filter1: (new (...args: any[]) => E1),
onReject: (error: E1) => R | PromiseLike<R>,
): Bluebird<R>;
caught<E1>(
filter1: ((error: E1) => boolean) | (E1 & object),
onReject: (error: E1) => R | PromiseLike<R>,
): Bluebird<R>;
caught<U, E1 extends Error>(
filter1: (new (...args: any[]) => E1),
onReject: (error: E1) => U | PromiseLike<U>,
): Bluebird<U | R>;
caught<U, E1>(
filter1: ((error: E1) => boolean) | (E1 & object),
onReject: (error: E1) => U | PromiseLike<U>,
): Bluebird<U | R>;
/**
* Like `.catch` but instead of catching all types of exceptions, it only catches those that don't originate from thrown errors but rather from explicit rejections.

@@ -356,0 +162,0 @@ */

4

bluebird/package.json
{
"name": "@types/bluebird",
"version": "3.5.18",
"version": "3.5.19",
"description": "TypeScript definitions for bluebird",

@@ -20,4 +20,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "c9b100367d31f8bd36031e55737d6ffde1a9b85dac3df3693f8f684f914c94cb",
"typesPublisherContentHash": "e83abd8cb7a2d7efab96d38332b7687ad712faefb2ae452ea6e79515f7679e65",
"typeScriptVersion": "2.3"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Tue, 31 Oct 2017 00:15:11 GMT
* Last updated: Wed, 20 Dec 2017 14:50:50 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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