Socket
Socket
Sign inDemoInstall

@types/bluebird

Package Overview
Dependencies
0
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.35 to 2.0.36

242

bluebird v2.0/index.d.ts

@@ -34,11 +34,13 @@ // Type definitions for bluebird 2.0.0

*/
new <T>(callback: (
resolve: (thenableOrResult?: T | PromiseLike<T>) => void,
reject: (error: any) => void,
onCancel?: PromiseCancelHandlerSetter
) => void): Promise<T>;
Promise: typeof Promise
new<T>(
callback: (
resolve: (thenableOrResult?: T | PromiseLike<T>) => void,
reject: (error: any) => void,
onCancel?: PromiseCancelHandlerSetter,
) => void,
): Promise<T>;
Promise: typeof Promise;
config(options: {
warnings?: boolean | {wForgottenReturn?: boolean | undefined} | undefined;
warnings?: boolean | { wForgottenReturn?: boolean | undefined } | undefined;
longStackTraces?: boolean | undefined;

@@ -138,7 +140,22 @@ cancellation?: boolean | undefined;

promisify<T>(func: (callback: (err: any, result: T) => void) => void, receiver?: any): () => Promise<T>;
promisify<T, A1>(func: (arg1: A1, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1) => Promise<T>;
promisify<T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2) => Promise<T>;
promisify<T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3) => Promise<T>;
promisify<T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<T>;
promisify<T, A1, A2, A3, A4, A5>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<T>;
promisify<T, A1>(
func: (arg1: A1, callback: (err: any, result: T) => void) => void,
receiver?: any,
): (arg1: A1) => Promise<T>;
promisify<T, A1, A2>(
func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void,
receiver?: any,
): (arg1: A1, arg2: A2) => Promise<T>;
promisify<T, A1, A2, A3>(
func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void,
receiver?: any,
): (arg1: A1, arg2: A2, arg3: A3) => Promise<T>;
promisify<T, A1, A2, A3, A4>(
func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void,
receiver?: any,
): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<T>;
promisify<T, A1, A2, A3, A4, A5>(
func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result: T) => void) => void,
receiver?: any,
): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<T>;
promisify(nodeFunction: Function, receiver?: any): Function;

@@ -154,8 +171,13 @@

/**
* Returns a promise that is resolved by a node style callback function.
*/
fromNode(resolver: (callback: (err: any, result?: any) => void) => void, options? : {multiArgs? : boolean | undefined}): Promise<any>;
fromCallback(resolver: (callback: (err: any, result?: any) => void) => void, options? : {multiArgs? : boolean | undefined}): Promise<any>;
fromNode(
resolver: (callback: (err: any, result?: any) => void) => void,
options?: { multiArgs?: boolean | undefined },
): Promise<any>;
fromCallback(
resolver: (callback: (err: any, result?: any) => void) => void,
options?: { multiArgs?: boolean | undefined },
): Promise<any>;

@@ -199,4 +221,8 @@ /**

// array with promises of different types
all<T1, T2, T3, T4, T5>(values: [PromiseLike<T1>, PromiseLike<T2>, PromiseLike<T3>, PromiseLike<T4>, PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
all<T1, T2, T3, T4>(values: [PromiseLike<T1>, PromiseLike<T2>, PromiseLike<T3>, PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>;
all<T1, T2, T3, T4, T5>(
values: [PromiseLike<T1>, PromiseLike<T2>, PromiseLike<T3>, PromiseLike<T4>, PromiseLike<T5>],
): Promise<[T1, T2, T3, T4, T5]>;
all<T1, T2, T3, T4>(
values: [PromiseLike<T1>, PromiseLike<T2>, PromiseLike<T3>, PromiseLike<T4>],
): Promise<[T1, T2, T3, T4]>;
all<T1, T2, T3>(values: [PromiseLike<T1>, PromiseLike<T2>, PromiseLike<T3>]): Promise<[T1, T2, T3]>;

@@ -292,12 +318,28 @@ all<T1, T2>(values: [PromiseLike<T1>, PromiseLike<T2>]): Promise<[T1, T2]>;

// promise of array with promises of value
map<T, U>(values: PromiseLike<PromiseLike<T>[]>, mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<T, U>(
values: PromiseLike<PromiseLike<T>[]>,
mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;
// promise of array with values
map<T, U>(values: PromiseLike<T[]>, mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<T, U>(
values: PromiseLike<T[]>,
mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;
// array with promises of value
map<T, U>(values: PromiseLike<T>[], mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<T, U>(
values: PromiseLike<T>[],
mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;
// array with values
map<T, U>(values: T[], mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<T, U>(
values: T[],
mapper: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;

@@ -312,14 +354,25 @@ /**

// promise of array with promises of value
mapSeries<R, U>(values: PromiseLike<PromiseLike<R>[]>, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<U[]>;
mapSeries<R, U>(
values: PromiseLike<PromiseLike<R>[]>,
mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<U[]>;
// promise of array with values
mapSeries<R, U>(values: PromiseLike<R[]>, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<U[]>;
mapSeries<R, U>(
values: PromiseLike<R[]>,
mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<U[]>;
// array with promises of value
mapSeries<R, U>(values: PromiseLike<R>[], mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<U[]>;
mapSeries<R, U>(
values: PromiseLike<R>[],
mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<U[]>;
// array with values
mapSeries<R, U>(values: R[], mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<U[]>;
mapSeries<R, U>(
values: R[],
mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<U[]>;
/**

@@ -333,12 +386,28 @@ * Reduce an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `reducer` function with the signature `(total, current, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well.

// promise of array with promises of value
reduce<T, U>(values: PromiseLike<PromiseLike<T>[]>, reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
reduce<T, U>(
values: PromiseLike<PromiseLike<T>[]>,
reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>,
initialValue?: U,
): Promise<U>;
// promise of array with values
reduce<T, U>(values: PromiseLike<T[]>, reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
reduce<T, U>(
values: PromiseLike<T[]>,
reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>,
initialValue?: U,
): Promise<U>;
// array with promises of value
reduce<T, U>(values: PromiseLike<T>[], reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
reduce<T, U>(
values: PromiseLike<T>[],
reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>,
initialValue?: U,
): Promise<U>;
// array with values
reduce<T, U>(values: T[], reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
reduce<T, U>(
values: T[],
reducer: (total: U, current: T, index: number, arrayLength: number) => U | PromiseLike<U>,
initialValue?: U,
): Promise<U>;

@@ -353,12 +422,28 @@ /**

// promise of array with promises of value
filter<T>(values: PromiseLike<PromiseLike<T>[]>, filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Promise.ConcurrencyOption): Promise<T[]>;
filter<T>(
values: PromiseLike<PromiseLike<T>[]>,
filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>,
option?: Promise.ConcurrencyOption,
): Promise<T[]>;
// promise of array with values
filter<T>(values: PromiseLike<T[]>, filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Promise.ConcurrencyOption): Promise<T[]>;
filter<T>(
values: PromiseLike<T[]>,
filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>,
option?: Promise.ConcurrencyOption,
): Promise<T[]>;
// array with promises of value
filter<T>(values: PromiseLike<T>[], filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Promise.ConcurrencyOption): Promise<T[]>;
filter<T>(
values: PromiseLike<T>[],
filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>,
option?: Promise.ConcurrencyOption,
): Promise<T[]>;
// array with values
filter<T>(values: T[], filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Promise.ConcurrencyOption): Promise<T[]>;
filter<T>(
values: T[],
filterer: (item: T, index: number, arrayLength: number) => boolean | PromiseLike<boolean>,
option?: Promise.ConcurrencyOption,
): Promise<T[]>;

@@ -371,7 +456,16 @@ /**

// promise of array with promises of value
each<T, U>(values: PromiseLike<PromiseLike<T>[]>, iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<T[]>;
each<T, U>(
values: PromiseLike<PromiseLike<T>[]>,
iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<T[]>;
// array with promises of value
each<T, U>(values: PromiseLike<T>[], iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<T[]>;
each<T, U>(
values: PromiseLike<T>[],
iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<T[]>;
// array with values OR promise of array with values
each<T, U>(values: T[] | PromiseLike<T[]>, iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>): Promise<T[]>;
each<T, U>(
values: T[] | PromiseLike<T[]>,
iterator: (item: T, index: number, arrayLength: number) => U | PromiseLike<U>,
): Promise<T[]>;
}

@@ -383,4 +477,12 @@

*/
then<U>(onFulfill: (value: T) => U | PromiseLike<U>, onReject?: (error: any) => U | PromiseLike<U>, onProgress?: (note: any) => any): Promise<U>;
then<U>(onFulfill: (value: T) => U | PromiseLike<U>, onReject?: (error: any) => void | PromiseLike<void>, onProgress?: (note: any) => any): Promise<U>;
then<U>(
onFulfill: (value: T) => U | PromiseLike<U>,
onReject?: (error: any) => U | PromiseLike<U>,
onProgress?: (note: any) => any,
): Promise<U>;
then<U>(
onFulfill: (value: T) => U | PromiseLike<U>,
onReject?: (error: any) => void | PromiseLike<void>,
onProgress?: (note: any) => any,
): Promise<U>;

@@ -405,4 +507,10 @@ /**

*/
catch(predicate: (error: any) => boolean, onReject: (error: any) => T | PromiseLike<T> | void | PromiseLike<void>): Promise<T>;
caught(predicate: (error: any) => boolean, onReject: (error: any) => T | PromiseLike<T> | void | PromiseLike<void>): Promise<T>;
catch(
predicate: (error: any) => boolean,
onReject: (error: any) => T | PromiseLike<T> | void | PromiseLike<void>,
): Promise<T>;
caught(
predicate: (error: any) => boolean,
onReject: (error: any) => T | PromiseLike<T> | void | PromiseLike<void>,
): Promise<T>;

@@ -418,3 +526,2 @@ catch<U>(predicate: (error: any) => boolean, onReject: (error: any) => U | PromiseLike<U>): Promise<U | T>;

/**

@@ -443,4 +550,12 @@ * 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.

*/
done<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => U | PromiseLike<U>, onProgress?: (note: any) => any): void;
done<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => U | PromiseLike<U>, onProgress?: (note: any) => any): void;
done<U>(
onFulfilled?: (value: T) => PromiseLike<U>,
onRejected?: (error: any) => U | PromiseLike<U>,
onProgress?: (note: any) => any,
): void;
done<U>(
onFulfilled?: (value: T) => U,
onRejected?: (error: any) => U | PromiseLike<U>,
onProgress?: (note: any) => any,
): void;

@@ -496,3 +611,7 @@ /**

*/
fork<U>(onFulfilled?: (value: T) => U | PromiseLike<U>, onRejected?: (error: any) => U | PromiseLike<U>, onProgress?: (note: any) => any): Promise<U>;
fork<U>(
onFulfilled?: (value: T) => U | PromiseLike<U>,
onRejected?: (error: any) => U | PromiseLike<U>,
onProgress?: (note: any) => any,
): Promise<U>;

@@ -553,4 +672,4 @@ /**

* promise.then(function(obj){
* return obj[propertyName].call(obj, arg...);
* });
* return obj[propertyName].call(obj, arg...);
* });
* </code>

@@ -565,4 +684,4 @@ */

* promise.then(function(obj){
* return obj[propertyName];
* });
* return obj[propertyName];
* });
* </code>

@@ -578,4 +697,4 @@ */

* .then(function() {
* return value;
* });
* return value;
* });
* </code>

@@ -597,4 +716,4 @@ *

* .then(function() {
* throw reason;
* });
* throw reason;
* });
* </code>

@@ -670,3 +789,6 @@ * Same limitations apply as with `.return()`.

// TODO type inference from array-resolving promise?
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<Q, U>(
mapper: (item: Q, index: number, arrayLength: number) => U | PromiseLike<U>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;

@@ -683,3 +805,6 @@ /**

// TODO type inference from array-resolving promise?
reduce<Q, U>(reducer: (memo: U, item: Q, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
reduce<Q, U>(
reducer: (memo: U, item: Q, index: number, arrayLength: number) => U | PromiseLike<U>,
initialValue?: U,
): Promise<U>;

@@ -690,3 +815,6 @@ /**

// TODO type inference from array-resolving promise?
filter<U>(filterer: (item: U, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, options?: Promise.ConcurrencyOption): Promise<U[]>;
filter<U>(
filterer: (item: U, index: number, arrayLength: number) => boolean | PromiseLike<boolean>,
options?: Promise.ConcurrencyOption,
): Promise<U[]>;

@@ -794,4 +922,4 @@ /**

// eslint-disable-next-line @definitelytyped/no-declare-current-package
declare module 'bluebird' {
declare module "bluebird" {
export = Promise;
}
{
"name": "@types/bluebird",
"version": "2.0.35",
"version": "2.0.36",
"description": "TypeScript definitions for bluebird",

@@ -28,4 +28,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bluebird",

"dependencies": {},
"typesPublisherContentHash": "dcc0a426458d07572c8be694bb2983784056426506e3d0b99ddced6a04395b15",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "e9b2239395139ed5721e8a47016edf8122a17a704bef8c69f6b3a04a7dc3b2ef",
"typeScriptVersion": "4.5"
}

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

### Additional Details
* Last updated: Mon, 11 Sep 2023 15:33:17 GMT
* Last updated: Fri, 15 Sep 2023 19:06:48 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `Promise`

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc