2019-05-27 01:58:34 +02:00
|
|
|
import PromiseKit
|
|
|
|
|
2020-09-15 03:30:45 +02:00
|
|
|
public extension AnyPromise {
|
2019-05-27 01:58:34 +02:00
|
|
|
|
2020-11-09 01:53:07 +01:00
|
|
|
static func from<T : Any>(_ promise: Promise<T>) -> AnyPromise {
|
2019-05-27 01:58:34 +02:00
|
|
|
let result = AnyPromise(promise)
|
|
|
|
result.retainUntilComplete()
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|