Interface JQueryDeferred

Interface for the JQuery deferred, part of callbacks

Hierarchy

Index

Methods

Methods

public always(alwaysCallbacks1?: JQueryPromiseCallback, alwaysCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is either resolved or rejected.

Parameters

  • alwaysCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that is called when the Deferred is resolved or rejected.

  • alwaysCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.

Returns

JQueryDeferred

public always(alwaysCallbacks1?: JQueryPromiseCallback[], alwaysCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Parameters

Returns

JQueryDeferred

public always(alwaysCallbacks1?: JQueryPromiseCallback, alwaysCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public always(alwaysCallbacks1?: JQueryPromiseCallback[], alwaysCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public done(doneCallbacks1?: JQueryPromiseCallback, doneCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is resolved.

Parameters

  • doneCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that are called when the Deferred is resolved.

  • doneCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.

Returns

JQueryDeferred

public done(doneCallbacks1?: JQueryPromiseCallback[], doneCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Parameters

Returns

JQueryDeferred

public done(doneCallbacks1?: JQueryPromiseCallback, doneCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public done(doneCallbacks1?: JQueryPromiseCallback[], doneCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public fail(failCallbacks1?: JQueryPromiseCallback, failCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is rejected.

Parameters

  • failCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that are called when the Deferred is rejected.

  • failCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.

Returns

JQueryDeferred

public fail(failCallbacks1?: JQueryPromiseCallback[], failCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Parameters

Returns

JQueryDeferred

public fail(failCallbacks1?: JQueryPromiseCallback, failCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public fail(failCallbacks1?: JQueryPromiseCallback[], failCallbacks2?: Array<any>): JQueryDeferred

Parameters

Returns

JQueryDeferred

public notify(args?: Array<any>): JQueryDeferred

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

Parameters

  • args?: Array<any> optional

    Optional arguments that are passed to the progressCallbacks.

Returns

JQueryDeferred

public notifyWith(context: any, args?: Array<any>): JQueryDeferred

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.

  • args?: Array<any> optional

    Optional arguments that are passed to the progressCallbacks.

Returns

JQueryDeferred

public pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise

Parameters

  • doneFilter?: (x: any) => any optional
  • failFilter?: (x: any) => any optional
  • progressFilter?: (x: any) => any optional

Returns

JQueryPromise

public progress(progressCallbacks?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object generates progress notifications.

Parameters

  • progressCallbacks?: JQueryPromiseCallback[] optional

    A function, or array of functions, to be called when the Deferred generates progress notifications.

Returns

JQueryDeferred

public promise(target?: any): JQueryPromise

Return a Deferred's Promise object.

Parameters

  • target?: any optional

    Object onto which the promise methods have to be attached

Returns

JQueryPromise

public reject(args?: Array<any>): JQueryDeferred

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

Parameters

  • args?: Array<any> optional

    Optional arguments that are passed to the failCallbacks.

Returns

JQueryDeferred

public rejectWith(context: any, args?: Array<any>): JQueryDeferred

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.

  • args?: Array<any> optional

    An optional array of arguments that are passed to the failCallbacks.

Returns

JQueryDeferred

public resolve(value?: T in JQueryDeferred<T>, args?: Array<any>): JQueryDeferred

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

Parameters

  • value?: T in JQueryDeferred<T> optional

    First argument passed to doneCallbacks.

  • args?: Array<any> optional

    Optional subsequent arguments that are passed to the doneCallbacks.

Returns

JQueryDeferred

public resolveWith(context: any, args?: Array<any>): JQueryDeferred

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.

  • args?: Array<any> optional

    An optional array of arguments that are passed to the doneCallbacks.

Returns

JQueryDeferred

public state(): string

Determine the current state of a Deferred object.

Returns

string

public then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (value: T) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (value: T) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (value: T) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (value: T) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (...values: any[]) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (...values: any[]) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (...values: any[]) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

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

Parameters

  • doneFilter: (...values: any[]) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

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

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise