Перейти к основному содержимому

Promise

Description​

Конструктор объекта Promise

Promise: (executor: SchedulerCallback) => any

Parameters​

  • executor - (required) function - колбэк, используемый для инициализации Promise

Returns​

  • promise - (object) - объект Promise

Example​

new scheduler.Promise(function(resolve, reject) {
setTimeout(function(){
resolve();
}, 5000);
}).then(function(){
alert("Resolved")
});

Details​

Конструктор объекта Promise.

Change log​

  • Добавлено в версии v6.0.
  • Перешёл с Bluebird на нативный Promise в версии v7.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.