From 173487bb8eebc25da03d6d8bc0a14b1c518821b4 Mon Sep 17 00:00:00 2001 From: marty-suzuki Date: Sat, 9 May 2020 03:39:39 +0900 Subject: [PATCH] Update README --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d5a169..5c9e493 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,21 @@ let t: ThrowableProperty = output.isEnabled try? t.throwableValue() ``` +If a property is defined as `Computed`, be able to access computed value. + +```swift +struct Output: OutputType { + let isEnabled: Computed +} + +var _isEnabled = false +let output = OutputWrapper(.init(isEnabled: Computed { _isEnabled })) + +output.isEnabled // false +_isEnabled = true +output.isEnabled // true +``` + ![](https://user-images.githubusercontent.com/2082134/64858314-f7dae380-d661-11e9-9a79-3ca5c53fd90a.png) ### State @@ -158,7 +173,7 @@ The rule of Extra is having other dependencies of [UnioStream](#uniostream). ```swift struct Extra: ExtraType { - let apiStream: GitHubSearchAPIStream() + let apiStream: GitHubSearchAPIStream } ```