/** * DevExtreme (core/utils/deferred.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ interface Callback { // eslint-disable-next-line @typescript-eslint/prefer-function-type (value: T, ...args: T[]): void; } /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export class DeferredObj { constructor(); state(): 'pending' | 'rejected' | 'resolved'; always(alwaysCallback?: Callback): DeferredObj; catch(catchCallback?: Callback): DeferredObj; then(resolveCallback?: Callback, rejectCallback?: Callback): DeferredObj; done(doneCallback?: Callback): DeferredObj; fail(failCallback?: Callback): DeferredObj; progress(progressCallback?: Callback): DeferredObj; notify(...args: T[]): DeferredObj; notifyWith(context: DeferredObj, args?: T[]): DeferredObj; reject(...args: T[]): DeferredObj; rejectWith(context: DeferredObj, args?: T[]): DeferredObj; resolve(...args: T[]): DeferredObj; resolveWith(context: DeferredObj, args?: T[]): DeferredObj; promise(target?: T): Promise; } /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export function Deferred(): DeferredObj; // eslint-disable-next-line @typescript-eslint/no-unused-vars /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface PromiseType { } /** * * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type DxPromise = {} extends PromiseType ? Promise : PromiseType; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type DxExtendedPromise = DxPromise & { then( onFulfilled?: ((value: T, extraParameters?: any) => TResult1 | PromiseLike) | undefined | null, onRejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null ): PromiseLike; }; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export function when(...args: (DeferredObj | T)[]): DeferredObj;