From ca0c4e6369dc5d41ca9a5c8b941747a479015e59 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 23 Jul 2018 12:12:53 -0400 Subject: [PATCH] [FAQ] How do I create a fulfilled `Void` promise? [ci skip] --- Documentation/FAQ.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/FAQ.md b/Documentation/FAQ.md index 2c02a17dd..7abe6e143 100644 --- a/Documentation/FAQ.md +++ b/Documentation/FAQ.md @@ -11,7 +11,17 @@ * Do you want to be able to use Promises with Swift 3.x, Swift 4.x, ObjC, iOS, tvOS, watchOS, macOS, Android & Linux? Then pick PromiseKit. * PromiseKit verifies its correctness by testing against the entire [Promises/A+ test suite](https://github.com/promises-aplus/promises-tests). -## How do I “Early `return`”? +## How do I create a fulfilled `Void` promise? + +```swift +let foo = Promise() + +// or: + +let bar = Promise.value(()) +``` + +## How do I “early `return`”? ```swift func foo() -> Promise {