-
Notifications
You must be signed in to change notification settings - Fork 1
Trait: DataStorage
| Name | Trait | Description |
|---|---|---|
| value | any | Holds the current value in the storage. Readonly. |
constructor() => DataStorage
Instantiates a new data storage.
fills the data storage with the given value.
Registers a callback for when ever a new value is filled into the data storage. This also fires if there is already a value inside the storage.
Same as when() but only fires when the data storage is filled the next time. The callback is not invoked for the current value.
Registers a callback which is invoked once the data storage has been filled. If the storage is already filled, it is invoked immediately.
Every method has two properties. then() and catch(). This means they can always be passed into something that expects a promise. While catch()'s callback never will be called, the then() callbacks will be registered just like they would have been in the actual function.