Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface JQueryDeferred<T>

Interface for the JQuery deferred, part of callbacks

Type parameters

  • T

Hierarchy

Index

Methods

always

done

fail

notify

  • Call the progressCallbacks on a Deferred object with the given args.

    Parameters

    • Optional value: any
    • Rest ...args: any[]

      Optional arguments that are passed to the progressCallbacks.

    Returns JQueryDeferred<T>

notifyWith

  • Call the progressCallbacks on a Deferred object with the given context and args.

    Parameters

    • context: any

      Context passed to the progressCallbacks as the this object.

    • Optional value: any[]

    Returns JQueryDeferred<T>

pipe

  • pipe(doneFilter?: function, failFilter?: function, progressFilter?: function): JQueryPromise<any>
  • Parameters

    • Optional doneFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    • Optional failFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    • Optional progressFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    Returns JQueryPromise<any>

progress

promise

  • Return a Deferred's Promise object.

    Parameters

    • Optional target: any

      Object onto which the promise methods have to be attached

    Returns JQueryPromise<T>

reject

  • Reject a Deferred object and call any failCallbacks with the given args.

    Parameters

    • Optional value: any
    • Rest ...args: any[]

      Optional arguments that are passed to the failCallbacks.

    Returns JQueryDeferred<T>

rejectWith

  • Reject a Deferred object and call any failCallbacks with the given context and args.

    Parameters

    • context: any

      Context passed to the failCallbacks as the this object.

    • Optional value: any[]

    Returns JQueryDeferred<T>

resolve

  • Resolve a Deferred object and call any doneCallbacks with the given args.

    Parameters

    • Optional value: T

      First argument passed to doneCallbacks.

    • Rest ...args: any[]

      Optional subsequent arguments that are passed to the doneCallbacks.

    Returns JQueryDeferred<T>

resolveWith

  • Resolve a Deferred object and call any doneCallbacks with the given context and args.

    Parameters

    • context: any

      Context passed to the doneCallbacks as the this object.

    • Optional value: T[]

    Returns JQueryDeferred<T>

state

  • state(): string
  • Determine the current state of a Deferred object.

    Returns string

then

  • then<U>(doneFilter: function, failFilter?: function, progressFilter?: function): JQueryPromise<U>
  • then(doneFilter: function, failFilter?: function, progressFilter?: function): JQueryPromise<void>
  • Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

    Type parameters

    • U

    Parameters

    • doneFilter: function

      A function that is called when the Deferred is resolved.

        • Parameters

          • Optional value: T
          • Rest ...values: any[]

          Returns U | JQueryPromise<U>

    • Optional failFilter: function

      An optional function that is called when the Deferred is rejected.

        • (...reasons: any[]): any
        • Parameters

          • Rest ...reasons: any[]

          Returns any

    • Optional progressFilter: function
        • (...progression: any[]): any
        • Parameters

          • Rest ...progression: any[]

          Returns any

    Returns JQueryPromise<U>

  • Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

    Parameters

    • doneFilter: function

      A function that is called when the Deferred is resolved.

        • (value?: T, ...values: any[]): void
        • Parameters

          • Optional value: T
          • Rest ...values: any[]

          Returns void

    • Optional failFilter: function

      An optional function that is called when the Deferred is rejected.

        • (...reasons: any[]): any
        • Parameters

          • Rest ...reasons: any[]

          Returns any

    • Optional progressFilter: function
        • (...progression: any[]): any
        • Parameters

          • Rest ...progression: any[]

          Returns any

    Returns JQueryPromise<void>

Generated using TypeDoc