From 891b482abcd9bd72bee3eff96361fe47beb0a4f0 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 9 Apr 2021 02:26:34 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b98283..e30c548 100644 --- a/README.md +++ b/README.md @@ -1269,27 +1269,41 @@ the `.set(..)` API/logic _and_ active encapsulation of the message API. #### `Promise.cooperative()` +Create a cooperative promise ```bnf Promise.cooperative() -> ``` - - #### `.set(..)` +Resolve `` with `` ```bnf .set() +.set(, true) -> ``` - +If `` is a promise, then `` will be bound to its state, i.e. +resolved if `` is resolved and rejected if it is rejected with the same +values. + +Reject `` with `` +```bnf +.set(, false) + -> +``` + +Calling `.set(..)` will set `.isSet` to `true`. #### `.isSet` - +Property representing if the cooperative promise was _set_ / `.set(..)` was +called (value is `true`) or no (`false`). + +This property is read-only. #### `.then(..)`