Skip to main content

Promise

Description

Promise object constructor

Promise: new (executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void) => Promise<unknown>

Parameters

  • executor - (required) function - a callback used to initialize the promise

Returns

  • promise - (object) - the promise object

Example

new gantt.Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, 5000);
}).then(() => {
alert("Resolved");
});

Details

Bluebird Promise object constructor, bundled with the Gantt library.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.