Add PromiseKit dependency
- Added PromiseKit dependency
This commit is contained in:
27
Carthage/Checkouts/PromiseKit/PromiseKit.playground/Contents.swift
vendored
Normal file
27
Carthage/Checkouts/PromiseKit/PromiseKit.playground/Contents.swift
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import PlaygroundSupport
|
||||
|
||||
// Is this erroring? If so open the `.xcodeproj` and build the
|
||||
// framework for a macOS target (usually labeled: “My Mac”).
|
||||
// Then select `PromiseKit.playground` from inside Xcode.
|
||||
import PromiseKit
|
||||
|
||||
|
||||
func promise3() -> Promise<Int> {
|
||||
return after(.seconds(1)).map{ 3 }
|
||||
}
|
||||
|
||||
firstly {
|
||||
Promise.value(1)
|
||||
}.map { _ in
|
||||
2
|
||||
}.then { _ in
|
||||
promise3()
|
||||
}.done {
|
||||
print($0) // => 3
|
||||
}.catch { error in
|
||||
// only happens for errors
|
||||
}.finally {
|
||||
PlaygroundPage.current.finishExecution()
|
||||
}
|
||||
|
||||
PlaygroundPage.current.needsIndefiniteExecution = true
|
||||
7
Carthage/Checkouts/PromiseKit/PromiseKit.playground/contents.xcplayground
vendored
Normal file
7
Carthage/Checkouts/PromiseKit/PromiseKit.playground/contents.xcplayground
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='3.0' sdk='macosx' auto-termination-delay='2'>
|
||||
<sections>
|
||||
<code source-file-name='section-1.swift'/>
|
||||
</sections>
|
||||
<timeline fileName='timeline.xctimeline'/>
|
||||
</playground>
|
||||
7
Carthage/Checkouts/PromiseKit/PromiseKit.playground/playground.xcworkspace/contents.xcworkspacedata
generated
vendored
Normal file
7
Carthage/Checkouts/PromiseKit/PromiseKit.playground/playground.xcworkspace/contents.xcworkspacedata
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
Reference in New Issue
Block a user