Socket
Socket
Sign inDemoInstall

bluebird-lst

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluebird-lst - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

258

index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for bluebird 3.5.0
// Type definitions for bluebird 3.5
// Project: https://github.com/petkaantonov/bluebird

@@ -38,3 +38,3 @@ // Definitions by: Leonard Hecker <https://github.com/lhecker>

declare class Bluebird<R> implements Promise<R>, Bluebird.Inspection<R> {
declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
[Symbol.toStringTag]: any

@@ -52,3 +52,3 @@

// Based on PromiseLike.then, but returns a Bluebird instance.
then<U>(onFulfill?: (value: R) => U | Bluebird.Thenable<U>, onReject?: (error: any) => U | Bluebird.Thenable<U>): Bluebird<U>; // For simpler signature help.
then<U>(onFulfill?: (value: R) => U | PromiseLike<U>, onReject?: (error: any) => U | PromiseLike<U>): Bluebird<U>; // For simpler signature help.
then<TResult1 = R, TResult2 = never>(onfulfilled?: ((value: R) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Bluebird<TResult1 | TResult2>;

@@ -347,4 +347,3 @@

*/
tap<U>(onFulFill: (value: R) => PromiseLike<U>): Bluebird<R>;
tap<U>(onFulfill: (value: R) => U): Bluebird<R>;
tap<U>(onFulFill: (value: R) => PromiseLike<U> | U): Bluebird<R>;

@@ -358,29 +357,29 @@ /**

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

@@ -530,29 +529,29 @@ ): Bluebird<R>;

catchReturn<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | object,
filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | object,
value: U,
): Bluebird<U>;
catchReturn<U, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | object,
value: U,
): Bluebird<U>;
catchReturn<U, E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
value: U,
): Bluebird<U>;
catchReturn<U, E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
value: U,
): Bluebird<U>;
catchReturn<U, E1 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
value: U,

@@ -575,29 +574,29 @@ ): Bluebird<U>;

catchThrow<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | object,
filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | object,
reason: Error,
): Bluebird<R>;
catchThrow<E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | object,
reason: Error,
): Bluebird<R>;
catchThrow<E1 extends Error, E2 extends Error, E3 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | object,
reason: Error,
): Bluebird<R>;
catchThrow<E1 extends Error, E2 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | object,
reason: Error,
): Bluebird<R>;
catchThrow<E1 extends Error>(
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | object,
reason: Error,

@@ -614,3 +613,3 @@ ): Bluebird<R>;

*/
toJSON(): Object;
toJSON(): object;

@@ -621,3 +620,3 @@ /**

spread<U, W>(fulfilledHandler: (...values: W[]) => U | PromiseLike<U>): Bluebird<U>;
spread<U>(fulfilledHandler: Function): Bluebird<U>;
spread<U>(fulfilledHandler: (...args: any[]) => U | PromiseLike<U>): Bluebird<U>;

@@ -633,3 +632,3 @@ /**

*/
props<K, V>(this: PromiseLike<Map<K, Bluebird.Thenable<V> | V>>): Bluebird<Map<K, V>>;
props<K, V>(this: PromiseLike<Map<K, PromiseLike<V> | V>>): Bluebird<Map<K, V>>;
props<T>(this: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;

@@ -709,3 +708,8 @@

*/
static method(fn: Function): Function;
static method<R, A1>(fn: (arg1: A1) => R | PromiseLike<R>): (arg1: A1) => Bluebird<R>;
static method<R, A1, A2>(fn: (arg1: A1, arg2: A2) => R | PromiseLike<R>): (arg1: A1, arg2: A2) => Bluebird<R>;
static method<R, A1, A2, A3>(fn: (arg1: A1, arg2: A2, arg3: A3) => R | PromiseLike<R>): (arg1: A1, arg2: A2, arg3: A3) => Bluebird<R>;
static method<R, A1, A2, A3, A4>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R | PromiseLike<R>): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Bluebird<R>;
static method<R, A1, A2, A3, A4, A5>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R | PromiseLike<R>): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Bluebird<R>;
static method<R>(fn: (...args: any[]) => R | PromiseLike<R>): (...args: any[]) => Bluebird<R>;

@@ -764,9 +768,9 @@ /**

*/
static promisify<T>(func: (callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): () => Bluebird<T>;
static promisify<T, A1>(func: (arg1: A1, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1) => Bluebird<T>;
static promisify<T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2) => Bluebird<T>;
static promisify<T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3) => Bluebird<T>;
static promisify<T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Bluebird<T>;
static 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, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Bluebird<T>;
static promisify(nodeFunction: Function, options?: Bluebird.PromisifyOptions): Function;
static promisify<T>(func: (callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): () => Bluebird<T>;
static promisify<T, A1>(func: (arg1: A1, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1) => Bluebird<T>;
static promisify<T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2) => Bluebird<T>;
static promisify<T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3) => Bluebird<T>;
static promisify<T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Bluebird<T>;
static 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, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Bluebird<T>;
static promisify(nodeFunction: (...args: any[]) => void, options?: Bluebird.PromisifyOptions): (...args: any[]) => Bluebird<any>;

@@ -779,3 +783,3 @@ /**

// TODO how to model promisifyAll?
static promisifyAll(target: Object, options?: Bluebird.PromisifyAllOptions): Object;
static promisifyAll(target: object, options?: Bluebird.PromisifyAllOptions): object;

@@ -793,5 +797,13 @@ /**

*/
// TODO fix coroutine GeneratorFunction
static coroutine<R>(generatorFunction: Function): Function;
// TODO: After https://github.com/Microsoft/TypeScript/issues/2983 is implemented, we can use
// the return type propagation of generators to automatically infer the return type T.
static coroutine<T>(generatorFunction: () => IterableIterator<any>, options?: Bluebird.CoroutineOptions): () => Bluebird<T>;
static coroutine<T, A1>(generatorFunction: (a1: A1) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1) => Bluebird<T>;
static coroutine<T, A1, A2>(generatorFunction: (a1: A1, a2: A2) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2) => Bluebird<T>;
static coroutine<T, A1, A2, A3>(generatorFunction: (a1: A1, a2: A2, a3: A3) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3) => Bluebird<T>;
static coroutine<T, A1, A2, A3, A4>(generatorFunction: (a1: A1, a2: A2, a3: A3, a4: A4) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3, a4: A4) => Bluebird<T>;
static coroutine<T, A1, A2, A3, A4, A5>(generatorFunction: (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5) => Bluebird<T>;
static coroutine<T, A1, A2, A3, A4, A5, A6>(generatorFunction: (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6) => Bluebird<T>;
static coroutine<T, A1, A2, A3, A4, A5, A6, A7>(generatorFunction: (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7) => Bluebird<T>;
static coroutine<T, A1, A2, A3, A4, A5, A6, A7, A8>(generatorFunction: (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8) => IterableIterator<any>, options?: Bluebird.CoroutineOptions): (a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8) => Bluebird<T>;
/**

@@ -815,3 +827,3 @@ * Add `handler` as the handler to call when there is a possibly unhandled rejection. The default handler logs the error stack to stderr or `console.error` in browsers.

// array with values
static all<R>(values: PromiseLike<(PromiseLike<R> | R)[]> | (PromiseLike<R> | R)[]): Bluebird<R[]>;
static all<R>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>): Bluebird<R[]>;

@@ -825,9 +837,10 @@ /**

*/
// trusted promise for map
static props<K, V>(map: PromiseLike<Map<K, PromiseLike<V> | V>>): Bluebird<Map<K, V>>;
// trusted promise for object
static props<K, V>(map: PromiseLike<Map<K, PromiseLike<V> | V>>): Bluebird<Map<K, V>>;
static props<T>(object: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;
static props<T>(object: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>; // tslint:disable-line:unified-signatures
// map
static props<K, V>(map: Map<K, PromiseLike<V> | V>): Bluebird<Map<K, V>>;
static props<K, V>(map: Map<K, PromiseLike<V> | V>): Bluebird<Map<K, V>>; // tslint:disable-line:unified-signatures
// object
static props<T>(object: Bluebird.ResolvableProps<T>): Bluebird<T>;
static props<T>(object: Bluebird.ResolvableProps<T>): Bluebird<T>; // tslint:disable-line:unified-signatures

@@ -837,3 +850,3 @@ /**

*/
static any<R>(values: PromiseLike<(PromiseLike<R> | R)[]> | (PromiseLike<R> | R)[]): Bluebird<R>;
static any<R>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>): Bluebird<R>;

@@ -845,3 +858,3 @@ /**

*/
static race<R>(values: PromiseLike<(PromiseLike<R> | R)[]> | (PromiseLike<R> | R)[]): Bluebird<R>;
static race<R>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>): Bluebird<R>;

@@ -855,10 +868,3 @@ /**

*/
// promise of array with promises of value
static some<R>(values: PromiseLike<PromiseLike<R>[]>, count: number): Bluebird<R[]>;
// promise of array with values
static some<R>(values: PromiseLike<R[]>, count: number): Bluebird<R[]>;
// array with promises of value
static some<R>(values: PromiseLike<R>[], count: number): Bluebird<R[]>;
// array with values
static some<R>(values: R[], count: number): Bluebird<R[]>;
static some<R>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>, count: number): Bluebird<R[]>;

@@ -882,3 +888,3 @@ /**

/** @deprecated use .all instead */
static join<R>(...values: (R | PromiseLike<R>)[]): Bluebird<R[]>;
static join<R>(...values: Array<R | PromiseLike<R>>): Bluebird<R[]>;

@@ -892,5 +898,3 @@ /**

*/
// promise of array with promises of value
// promise of array with promises of value
static map<R, U>(values: PromiseLike<PromiseLike<R>[]> | PromiseLike<R[]> | Iterable<R> | PromiseLike<R>[] | Iterable<PromiseLike<R>>, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;
static map<R, U>(values: PromiseLike<Array<PromiseLike<R> | R> | Iterable<PromiseLike<R> | R>> | Array<PromiseLike<R> | R> | Iterable<PromiseLike<R> | R>, mapper: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;

@@ -904,14 +908,4 @@ /**

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

@@ -924,14 +918,4 @@ * Filter an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `filterer` function with the signature `(item, 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
static filter<R>(values: PromiseLike<PromiseLike<R>[]>, filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Bluebird.ConcurrencyOption): Bluebird<R[]>;
static filter<R>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>, filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Bluebird.ConcurrencyOption): Bluebird<R[]>;
// promise of array with values
static filter<R>(values: PromiseLike<R[]>, filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Bluebird.ConcurrencyOption): Bluebird<R[]>;
// array with promises of value
static filter<R>(values: PromiseLike<R>[], filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Bluebird.ConcurrencyOption): Bluebird<R[]>;
// array with values
static filter<R>(values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, option?: Bluebird.ConcurrencyOption): Bluebird<R[]>;
/**

@@ -942,8 +926,3 @@ * Iterate over an array, or a promise of an array, which contains promises (or a mix of promises and values) with the given iterator function with the signature (item, index, value) where item is the resolved value of a respective promise in the input array. Iteration happens serially. If any promise in the input array is rejected the returned promise is rejected as well.

*/
// promise of array with promises of value
static each<R, U>(values: PromiseLike<PromiseLike<R>[]>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R[]>;
// array with promises of value
static each<R, U>(values: PromiseLike<R>[], iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R[]>;
// array with values OR promise of array with values
static each<R, U>(values: R[] | PromiseLike<R[]>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R[]>;
static each<R, U>(values: PromiseLike<Array<PromiseLike<R> | R>> | Array<PromiseLike<R> | R>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R[]>;

@@ -957,3 +936,3 @@ /**

*/
static mapSeries<R, U>(values: (R | PromiseLike<R>)[] | PromiseLike<(R | PromiseLike<R>)[]>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<U[]>;
static mapSeries<R, U>(values: PromiseLike<Array<PromiseLike<R> | R> | Iterable<PromiseLike<R> | R>> | Array<PromiseLike<R> | R> | Iterable<PromiseLike<R> | R>, iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<U[]>;

@@ -1011,2 +990,8 @@ /**

/**
* Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise.
* If promise cancellation is enabled, passed in function will receive one more function argument `onCancel` that allows to register an optional cancellation callback.
*/
static Promise: typeof Bluebird;
/**
* The version number of the library

@@ -1018,21 +1003,24 @@ */

declare namespace Bluebird {
export interface ConcurrencyOption {
interface ConcurrencyOption {
concurrency: number;
}
export interface SpreadOption {
interface SpreadOption {
spread: boolean;
}
export interface FromNodeOptions {
interface FromNodeOptions {
multiArgs?: boolean;
}
export interface PromisifyOptions {
interface PromisifyOptions {
context?: any;
multiArgs?: boolean;
}
export interface PromisifyAllOptions extends PromisifyOptions {
interface PromisifyAllOptions extends PromisifyOptions {
suffix?: string;
filter?: (name: string, func: Function, target?: any, passesDefaultFilter?: boolean) => boolean;
filter?(name: string, func: (...args: any[]) => any, target?: any, passesDefaultFilter?: boolean): boolean;
// The promisifier gets a reference to the original method and should return a function which returns a promise
promisifier?: (originalMethod: Function) => () => PromiseLike<any>;
promisifier?(originalMethod: (...args: any[]) => any, defaultPromisifer: (...args: any[]) => (...args: any[]) => Bluebird<any>): () => PromiseLike<any>;
}
interface CoroutineOptions {
yieldHandler(value: any): any;
}

@@ -1047,3 +1035,3 @@ /**

*/
export class OperationalError extends Error { }
class OperationalError extends Error { }

@@ -1053,3 +1041,3 @@ /**

*/
export class TimeoutError extends Error { }
class TimeoutError extends Error { }

@@ -1059,3 +1047,3 @@ /**

*/
export class CancellationError extends Error {}
class CancellationError extends Error {}

@@ -1070,3 +1058,3 @@ /**

*/
export class AggregateError extends Error implements ArrayLike<Error> {
class AggregateError extends Error implements ArrayLike<Error> {
length: number;

@@ -1093,15 +1081,13 @@ [index: number]: Error;

/**
* returned by `Bluebird.disposer()`.
*/
export class Disposer<R> {
}
class Disposer<R> {}
/** @deprecated Use PromiseLike<T> directly. */
export type Thenable<T> = PromiseLike<T>;
type Thenable<T> = PromiseLike<T>;
export type ResolvableProps<T> = object & { [K in keyof T]: PromiseLike<T[K]> | T[K] };
type ResolvableProps<T> = object & { [K in keyof T]: PromiseLike<T[K]> | T[K] };
export interface Resolver<R> {
interface Resolver<R> {
/**

@@ -1129,6 +1115,6 @@ * Returns a reference to the controlled promise that can be passed to clients.

// TODO specify resolver callback
callback: (err: any, value: R, ...values: R[]) => void;
callback(err: any, value: R, ...values: R[]): void;
}
export interface Inspection<R> {
interface Inspection<R> {
/**

@@ -1174,3 +1160,3 @@ * See if the underlying promise was fulfilled at the creation time of this inspection object.

*/
export function getNewLibraryCopy(): typeof Bluebird;
function getNewLibraryCopy(): typeof Bluebird;

@@ -1182,3 +1168,3 @@ /**

*/
export function noConflict(): typeof Bluebird;
function noConflict(): typeof Bluebird;

@@ -1191,5 +1177,5 @@ /**

*/
export function setScheduler(scheduler: (callback: (...args: any[]) => void) => void): void;
function setScheduler(scheduler: (callback: (...args: any[]) => void) => void): void;
}
export = Bluebird;
export = Bluebird;
{
"name": "bluebird-lst",
"version": "1.0.4",
"version": "1.0.5",
"description": "Bluebird — longStackTraces: true, cancellation: true",

@@ -5,0 +5,0 @@ "author": "Vladimir Krivosheev",

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