Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "promise/promise-like"

Index

Variables

isArray

isArray: isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === "[object Array]"; }

Functions

DummyPromise

  • DummyPromise<T>(fn: function): void
  • Defines a dummy promise, which simulates the behavior of a normal Promise but is suitable used in synchronous call. This resulted object is also a jQuery deferred object, therefore, it will be resolved by the jQuery deferred object if it is a resolved value in the jQuery deferred object.

    Type parameters

    • T

    Parameters

    • fn: function
        • (resolve: function, reject: function): void
        • Parameters

          • resolve: function
              • (value?: T | PromiseLike<T>): void
              • Parameters

                • Optional value: T | PromiseLike<T>

                Returns void

          • reject: function
              • (reason?: any): void
              • Parameters

                • Optional reason: any

                Returns void

          Returns void

    Returns void

Handler

  • Handler(onFulfilled: any, onRejected: any, resolve: any, reject: any): void

asap

  • asap(fn: any): void

bind

  • bind(fn: any, thisArg: any): (Anonymous function)

doResolve

  • doResolve(fn: any, onFulfilled: any, onRejected: any): void
  • Take a potentially misbehaving resolver function and make sure onFulfilled and onRejected are only called once.

    Makes no guarantees about asynchrony.

    Parameters

    • fn: any
    • onFulfilled: any
    • onRejected: any

    Returns void

finale

  • finale(): void

handle

  • handle(deferred: any): void

reject

  • reject(newValue: any): void

resolve

  • resolve(newValue: any): void

Generated using TypeDoc