Skip to content

Commit

Permalink
[FAQ] How do I create a fulfilled Void promise?
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
mxcl committed Jul 23, 2018
1 parent e50702a commit ca0c4e6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Documentation/FAQ.md
Expand Up @@ -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<Void> {
Expand Down

0 comments on commit ca0c4e6

Please sign in to comment.