Promise
Description
Konstruktor zum Erstellen eines Promise-Objekts
Promise: (executor: SchedulerCallback) => any
Parameters
executor- (required) function - ein Callback, das das Promise einrichtet
Returns
promise- (object) - das erstellte Promise-Objekt
Example
new scheduler.Promise(function(resolve, reject) {
setTimeout(function(){
resolve();
}, 5000);
}).then(function(){
alert("Resolved")
});
Details
Dies ist der Konstruktor für das Promise-Objekt.
Change log
- Eingeführt in Version 6.0.
- Wechsel von Bluebird zu nativen Promise in Version 7.0.
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.