@types/bluebird-global

  • Version 3.5.13
  • Published
  • 18.9 kB
  • 1 dependency
  • MIT license

Install

npm i @types/bluebird-global
yarn add @types/bluebird-global
pnpm add @types/bluebird-global

Overview

TypeScript definitions for bluebird

Index

Namespaces

namespace global

namespace global {}

    variable Promise

    var Promise: PromiseConstructor;

      interface Promise

      interface Promise<T> {}

        property asCallback

        asCallback: Bluebird<T>['asCallback'];

          property bind

          bind: Bluebird<T>['bind'];

            property call

            call: Bluebird<T>['call'];

              property cancel

              cancel: Bluebird<T>['cancel'];

                property catchReturn

                catchReturn: Bluebird<T>['catchReturn'];

                  property catchThrow

                  catchThrow: Bluebird<T>['catchThrow'];

                    property caught

                    caught: Bluebird<T>['caught'];

                      property delay

                      delay: Bluebird<T>['delay'];

                        property disposer

                        disposer: Bluebird<T>['disposer'];

                          property done

                          done: Bluebird<T>['done'];

                            property error

                            error: Bluebird<T>['error'];

                              property get

                              get: Bluebird<T>['get'];

                                property isCancelled

                                isCancelled: Bluebird<T>['isCancelled'];

                                  property isFulfilled

                                  isFulfilled: Bluebird<T>['isFulfilled'];

                                    property isPending

                                    isPending: Bluebird<T>['isPending'];

                                      property isRejected

                                      isRejected: Bluebird<T>['isRejected'];

                                        property isResolved

                                        isResolved: Bluebird<T>['isResolved'];

                                          property lastly

                                          lastly: Bluebird<T>['lastly'];

                                            property nodeify

                                            nodeify: Bluebird<T>['nodeify'];

                                              property props

                                              props: Bluebird<T>['props'];

                                                property reason

                                                reason: Bluebird<T>['reason'];

                                                  property reflect

                                                  reflect: Bluebird<T>['reflect'];

                                                    property return

                                                    return: Bluebird<T>['return'];

                                                      property suppressUnhandledRejections

                                                      suppressUnhandledRejections: Bluebird<T>['suppressUnhandledRejections'];

                                                        property tap

                                                        tap: Bluebird<T>['tap'];

                                                          property tapCatch

                                                          tapCatch: Bluebird<T>['tapCatch'];

                                                            property thenReturn

                                                            thenReturn: Bluebird<T>['thenReturn'];

                                                              property thenThrow

                                                              thenThrow: Bluebird<T>['thenThrow'];

                                                                property throw

                                                                throw: Bluebird<T>['throw'];

                                                                  property timeout

                                                                  timeout: Bluebird<T>['timeout'];

                                                                    property toJSON

                                                                    toJSON: Bluebird<T>['toJSON'];

                                                                      property toString

                                                                      toString: Bluebird<T>['toString'];

                                                                        property value

                                                                        value: Bluebird<T>['value'];

                                                                          method all

                                                                          all: { (this: Promise<Iterable<{}>>): Bluebird<T>; (): Bluebird<never> };

                                                                            method any

                                                                            any: { <Q>(this: Promise<T & Iterable<Q>>): Bluebird<Q>; (): Bluebird<never> };

                                                                              method catch

                                                                              catch: {
                                                                              <TResult = never>(
                                                                              onrejected?: (reason: any) => TResult | PromiseLike<TResult>
                                                                              ): Promise<T | TResult>;
                                                                              <TResult = never>(
                                                                              onrejected?: (reason: any) => TResult | PromiseLike<TResult>
                                                                              ): Promise<T | TResult>;
                                                                              (
                                                                              predicate: (error: any) => boolean,
                                                                              onReject: (error: any) => void | T | PromiseLike<T> | PromiseLike<void>
                                                                              ): Bluebird<T>;
                                                                              <U>(
                                                                              predicate: (error: any) => boolean,
                                                                              onReject: (error: any) => U | PromiseLike<U>
                                                                              ): Bluebird<T | U>;
                                                                              <E extends Error>(
                                                                              ErrorClass: new (...args: any[]) => E,
                                                                              onReject: (error: E) => void | T | PromiseLike<T> | PromiseLike<void>
                                                                              ): Bluebird<T>;
                                                                              <E extends Error, U>(
                                                                              ErrorClass: new (...args: any[]) => E,
                                                                              onReject: (error: E) => U | PromiseLike<U>
                                                                              ): Bluebird<T | U>;
                                                                              (
                                                                              predicate: Object,
                                                                              onReject: (error: any) => void | T | PromiseLike<T> | PromiseLike<void>
                                                                              ): Bluebird<T>;
                                                                              <U>(
                                                                              predicate: Object,
                                                                              onReject: (error: any) => U | PromiseLike<U>
                                                                              ): Bluebird<T | U>;
                                                                              };

                                                                                method each

                                                                                each: <Q>(
                                                                                this: Promise<T & Iterable<Q>>,
                                                                                iterator: IterateFunction<Q, any>
                                                                                ) => Bluebird<T>;

                                                                                  method filter

                                                                                  filter: <Q>(
                                                                                  this: Promise<T & Iterable<Q>>,
                                                                                  filterer: IterateFunction<Q, boolean>,
                                                                                  options?: Bluebird.ConcurrencyOption
                                                                                  ) => Bluebird<T>;

                                                                                    method finally

                                                                                    finally: {
                                                                                    (onfinally?: () => void): Promise<T>;
                                                                                    (onfinally?: (() => void) | null): Promise<T>;
                                                                                    };

                                                                                      method map

                                                                                      map: <U, Q>(
                                                                                      this: Promise<T & Iterable<Q>>,
                                                                                      mapper: IterateFunction<Q, U>,
                                                                                      options?: Bluebird.ConcurrencyOption
                                                                                      ) => Bluebird<U[]>;

                                                                                        method mapSeries

                                                                                        mapSeries: <U, Q>(
                                                                                        this: Promise<T & Iterable<Q>>,
                                                                                        iterator: IterateFunction<Q, U>
                                                                                        ) => Bluebird<U[]>;

                                                                                          method race

                                                                                          race: { <Q>(this: Promise<T & Iterable<Q>>): Bluebird<Q>; (): Bluebird<never> };

                                                                                            method reduce

                                                                                            reduce: <U, Q>(
                                                                                            this: Promise<T & Iterable<Q>>,
                                                                                            reducer: (
                                                                                            memo: U,
                                                                                            item: Q,
                                                                                            index: number,
                                                                                            arrayLength: number
                                                                                            ) => U | PromiseLike<U>,
                                                                                            initialValue?: U
                                                                                            ) => Bluebird<U>;

                                                                                              method some

                                                                                              some: (this: Promise<Iterable<{}>>, count: number) => Bluebird<T>;

                                                                                                method spread

                                                                                                spread: <U, Q>(
                                                                                                this: Bluebird<T & Iterable<Q>>,
                                                                                                fulfilledHandler: (...values: Q[]) => U | PromiseLike<U>
                                                                                                ) => Bluebird<U>;

                                                                                                  method then

                                                                                                  then: {
                                                                                                  <TResult1 = T, TResult2 = never>(
                                                                                                  onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>,
                                                                                                  onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>
                                                                                                  ): Promise<TResult1 | TResult2>;
                                                                                                  <TResult1 = T, TResult2 = never>(
                                                                                                  onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>,
                                                                                                  onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>
                                                                                                  ): Promise<TResult1 | TResult2>;
                                                                                                  };

                                                                                                    interface PromiseConstructor

                                                                                                    interface PromiseConstructor {}

                                                                                                      property any

                                                                                                      any: typeof Bluebird.any;

                                                                                                        property attempt

                                                                                                        attempt: typeof Bluebird.attempt;

                                                                                                          property bind

                                                                                                          bind: typeof Bluebird.bind;

                                                                                                            property cast

                                                                                                            cast: typeof Bluebird.cast;

                                                                                                              property config

                                                                                                              config: typeof Bluebird.config;

                                                                                                                property coroutine

                                                                                                                coroutine: typeof Bluebird.coroutine;

                                                                                                                  property defer

                                                                                                                  defer: typeof Bluebird.defer;

                                                                                                                    property delay

                                                                                                                    delay: typeof Bluebird.delay;

                                                                                                                      property each

                                                                                                                      each: typeof Bluebird.each;

                                                                                                                        property filter

                                                                                                                        filter: typeof Bluebird.filter;

                                                                                                                          property fromCallback

                                                                                                                          fromCallback: typeof Bluebird.fromCallback;

                                                                                                                            property fromNode

                                                                                                                            fromNode: typeof Bluebird.fromNode;

                                                                                                                              property is

                                                                                                                              is: typeof Bluebird.is;

                                                                                                                                property join

                                                                                                                                join: typeof Bluebird.join;

                                                                                                                                  property longStackTraces

                                                                                                                                  longStackTraces: typeof Bluebird.longStackTraces;

                                                                                                                                    property map

                                                                                                                                    map: typeof Bluebird.map;

                                                                                                                                      property mapSeries

                                                                                                                                      mapSeries: typeof Bluebird.mapSeries;

                                                                                                                                        property method

                                                                                                                                        method: typeof Bluebird.method;

                                                                                                                                          property onPossiblyUnhandledRejection

                                                                                                                                          onPossiblyUnhandledRejection: typeof Bluebird.onPossiblyUnhandledRejection;

                                                                                                                                            property promisify

                                                                                                                                            promisify: typeof Bluebird.promisify;

                                                                                                                                              property promisifyAll

                                                                                                                                              promisifyAll: typeof Bluebird.promisifyAll;

                                                                                                                                                property props

                                                                                                                                                props: typeof Bluebird.props;

                                                                                                                                                  property reduce

                                                                                                                                                  reduce: typeof Bluebird.reduce;

                                                                                                                                                    property some

                                                                                                                                                    some: typeof Bluebird.some;

                                                                                                                                                      property try

                                                                                                                                                      try: typeof Bluebird.try;

                                                                                                                                                        property using

                                                                                                                                                        using: typeof Bluebird.using;

                                                                                                                                                          method all

                                                                                                                                                          all: {
                                                                                                                                                          <T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
                                                                                                                                                          <T extends readonly unknown[] | []>(values: T): Promise<{
                                                                                                                                                          -readonly [P in keyof T]: Awaited<T[P]>;
                                                                                                                                                          }>;
                                                                                                                                                          <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>,
                                                                                                                                                          T6 | PromiseLike<T6>,
                                                                                                                                                          T7 | PromiseLike<T7>,
                                                                                                                                                          T8 | PromiseLike<T8>,
                                                                                                                                                          T9 | PromiseLike<T9>,
                                                                                                                                                          T10 | PromiseLike<T10>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
                                                                                                                                                          <T1, T2, T3, T4, T5, T6, T7, T8, T9>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>,
                                                                                                                                                          T6 | PromiseLike<T6>,
                                                                                                                                                          T7 | PromiseLike<T7>,
                                                                                                                                                          T8 | PromiseLike<T8>,
                                                                                                                                                          T9 | PromiseLike<T9>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
                                                                                                                                                          <T1, T2, T3, T4, T5, T6, T7, T8>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>,
                                                                                                                                                          T6 | PromiseLike<T6>,
                                                                                                                                                          T7 | PromiseLike<T7>,
                                                                                                                                                          T8 | PromiseLike<T8>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
                                                                                                                                                          <T1, T2, T3, T4, T5, T6, T7>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>,
                                                                                                                                                          T6 | PromiseLike<T6>,
                                                                                                                                                          T7 | PromiseLike<T7>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
                                                                                                                                                          <T1, T2, T3, T4, T5, T6>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>,
                                                                                                                                                          T6 | PromiseLike<T6>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5, T6]>;
                                                                                                                                                          <T1, T2, T3, T4, T5>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>,
                                                                                                                                                          T5 | PromiseLike<T5>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4, T5]>;
                                                                                                                                                          <T1, T2, T3, T4>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>,
                                                                                                                                                          T4 | PromiseLike<T4>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3, T4]>;
                                                                                                                                                          <T1, T2, T3>(
                                                                                                                                                          values: [
                                                                                                                                                          T1 | PromiseLike<T1>,
                                                                                                                                                          T2 | PromiseLike<T2>,
                                                                                                                                                          T3 | PromiseLike<T3>
                                                                                                                                                          ]
                                                                                                                                                          ): Promise<[T1, T2, T3]>;
                                                                                                                                                          <T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<
                                                                                                                                                          [T1, T2]
                                                                                                                                                          >;
                                                                                                                                                          <T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
                                                                                                                                                          };

                                                                                                                                                            method race

                                                                                                                                                            race: {
                                                                                                                                                            <T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
                                                                                                                                                            <T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
                                                                                                                                                            <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>,
                                                                                                                                                            T6 | PromiseLike<T6>,
                                                                                                                                                            T7 | PromiseLike<T7>,
                                                                                                                                                            T8 | PromiseLike<T8>,
                                                                                                                                                            T9 | PromiseLike<T9>,
                                                                                                                                                            T10 | PromiseLike<T10>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
                                                                                                                                                            <T1, T2, T3, T4, T5, T6, T7, T8, T9>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>,
                                                                                                                                                            T6 | PromiseLike<T6>,
                                                                                                                                                            T7 | PromiseLike<T7>,
                                                                                                                                                            T8 | PromiseLike<T8>,
                                                                                                                                                            T9 | PromiseLike<T9>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
                                                                                                                                                            <T1, T2, T3, T4, T5, T6, T7, T8>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>,
                                                                                                                                                            T6 | PromiseLike<T6>,
                                                                                                                                                            T7 | PromiseLike<T7>,
                                                                                                                                                            T8 | PromiseLike<T8>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
                                                                                                                                                            <T1, T2, T3, T4, T5, T6, T7>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>,
                                                                                                                                                            T6 | PromiseLike<T6>,
                                                                                                                                                            T7 | PromiseLike<T7>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
                                                                                                                                                            <T1, T2, T3, T4, T5, T6>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>,
                                                                                                                                                            T6 | PromiseLike<T6>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
                                                                                                                                                            <T1, T2, T3, T4, T5>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>,
                                                                                                                                                            T5 | PromiseLike<T5>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4 | T5>;
                                                                                                                                                            <T1, T2, T3, T4>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>,
                                                                                                                                                            T4 | PromiseLike<T4>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3 | T4>;
                                                                                                                                                            <T1, T2, T3>(
                                                                                                                                                            values: [
                                                                                                                                                            T1 | PromiseLike<T1>,
                                                                                                                                                            T2 | PromiseLike<T2>,
                                                                                                                                                            T3 | PromiseLike<T3>
                                                                                                                                                            ]
                                                                                                                                                            ): Promise<T1 | T2 | T3>;
                                                                                                                                                            <T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<
                                                                                                                                                            T1 | T2
                                                                                                                                                            >;
                                                                                                                                                            <T>(values: (T | PromiseLike<T>)[]): Promise<T>;
                                                                                                                                                            };

                                                                                                                                                              method reject

                                                                                                                                                              reject: {
                                                                                                                                                              <T = never>(reason?: any): Promise<T>;
                                                                                                                                                              (reason: any): Promise<never>;
                                                                                                                                                              <T>(reason: any): Promise<T>;
                                                                                                                                                              };

                                                                                                                                                                method resolve

                                                                                                                                                                resolve: {
                                                                                                                                                                (): Promise<void>;
                                                                                                                                                                <T>(value: T | PromiseLike<T>): Promise<T>;
                                                                                                                                                                <T>(value: T | PromiseLike<T>): Promise<T>;
                                                                                                                                                                (): Promise<void>;
                                                                                                                                                                };

                                                                                                                                                                  construct signature

                                                                                                                                                                  new <T>(
                                                                                                                                                                  callback: (
                                                                                                                                                                  resolve: (thenableOrResult?: T | PromiseLike<T>) => void,
                                                                                                                                                                  reject: (error?: any) => void,
                                                                                                                                                                  onCancel?: (callback: () => void) => void
                                                                                                                                                                  ) => void
                                                                                                                                                                  ): Promise<T>;

                                                                                                                                                                    type IterateFunction

                                                                                                                                                                    type IterateFunction<T, R> = (
                                                                                                                                                                    item: T,
                                                                                                                                                                    index: number,
                                                                                                                                                                    arrayLength: number
                                                                                                                                                                    ) => R | PromiseLike<R>;

                                                                                                                                                                      Package Files (1)

                                                                                                                                                                      Dependencies (1)

                                                                                                                                                                      Dev Dependencies (0)

                                                                                                                                                                      No dev dependencies.

                                                                                                                                                                      Peer Dependencies (0)

                                                                                                                                                                      No peer dependencies.

                                                                                                                                                                      Badge

                                                                                                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/bluebird-global.

                                                                                                                                                                      • Markdown
                                                                                                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/bluebird-global)
                                                                                                                                                                      • HTML
                                                                                                                                                                        <a href="https://www.jsdocs.io/package/@types/bluebird-global"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>