Skip to main content

Deferred Class

A deferred creates a promise and the ability to resolve or reject it

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/core-utils/legacy.

For more information about our API support guarantees, see here.

Signature

export declare class Deferred<T>

Type Parameters

Parameter Description
T

Constructors

Constructor Alerts Description
(constructor)() Alpha Constructs a new instance of the Deferred class

Properties

Property Alerts Modifiers Type Description
isCompleted Alpha readonly boolean Returns whether the underlying promise has been completed
promise Alpha readonly Promise<T> Retrieves the underlying promise for the deferred

Constructor Details

(constructor)

Constructs a new instance of the Deferred class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

constructor();

Property Details

isCompleted

Returns whether the underlying promise has been completed

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

get isCompleted(): boolean;

Type: boolean

promise

Retrieves the underlying promise for the deferred

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

get promise(): Promise<T>;

Type: Promise<T>