Skip to content

Commit fefe0d7

Browse files
authored
additional arg
1 parent 0b663d6 commit fefe0d7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

1-js/11-async/02-promise-basics/article.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,25 @@ let promise = new Promise(function(resolve, reject) {
8383

8484
به وعده‌ای که یا حل‌و‌فصل(resolved) می‌شود یا رد(rejected) می‌شود، "تسویه‌شده" ("settled") می‌گویند، برخلاف وعده‌ای(promise) که در ابتدا "درحال انتظار" ("pending") است.
8585

86-
````smart header="There can be only a single result or an error"
87-
The executor should call only one `resolve` or one `reject`. Any state change is final.
86+
````smart header="تنها یک نتیجه یا یک خطا می تواند وجود داشته باشد"
87+
.را فراخوانی کند. هر تغییر وضعیتی نهایی است `reject` یا یک `resolve` اجرا‌کننده باید فقط یک
8888
89-
All further calls of `resolve` and `reject` are ignored:
89+
:نادیده گرفته می‌شوند `reject` و `resolve` همه فراخوانی‌های دیگر از
9090
9191
```js
9292
let promise = new Promise(function(resolve, reject) {
9393
*!*
9494
resolve("done");
9595
*/!*
9696
97-
reject(new Error("…")); // ignored
98-
setTimeout(() => resolve("…")); // ignored
97+
reject(new Error("…")); // نادیده گرفته شد
98+
setTimeout(() => resolve("…")); // نادیده گرفته شد
9999
});
100100
```
101101
102-
The idea is that a job done by the executor may have only one result or an error.
102+
ایده این است که کار انجام شده توسط اجرا‌کننده ممکن است تنها یک نتیجه یا یک خطا داشته باشد.
103103
104-
Also, `resolve`/`reject` expect only one argument (or none) and will ignore additional arguments.
104+
.تنها یک آرگومان (یا هیچی) را انتظار دارد و آرگومان‌های اضافی را نادیده می‌گیرد `resolve`/`reject` ،همچنین
105105
````
106106

107107
```smart header="Reject with `Error` objects"

0 commit comments

Comments
 (0)