Skip to content

Commit 334102b

Browse files
Merge pull request #82 from mlakatkou/GS-3322
[update] promise article
2 parents e8a54b2 + 6610db0 commit 334102b

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docs/api/method/promise.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ description: "Promise object constructor"
1717
- `executor` - (required) *function* - a callback used to initialize the promise
1818

1919
### Returns
20-
- ` promise` - (object) - the promise object
20+
21+
- `promise` - (object) - the promise object
2122

2223
### Example
2324

2425
~~~jsx
25-
new gantt.Promise(function(resolve, reject) {
26-
setTimeout(function(){
26+
new gantt.Promise((resolve, reject) => {
27+
setTimeout(() => {
2728
resolve();
2829
}, 5000);
29-
}).then(function(){
30-
alert("Resolved")
30+
}).then(() => {
31+
alert("Resolved");
3132
});
3233
~~~
3334

0 commit comments

Comments
 (0)