Skip to content

Commit

Permalink
Add Promise->Publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRabil committed Sep 17, 2021
1 parent 3d5a566 commit 17d38c6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/Pwomise/Extensions/Promise+Publisher.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//// File.swift
//
//
// Created by Eric Rabil on 9/17/21.
//
//

import Foundation
import Combine

@available(macOS 10.15, *)
public extension Promise {
var publisher: Future<Output, Error> {
Future { resolve in
let _ = self.observeAlways(resolve)
}
}
}

0 comments on commit 17d38c6

Please sign in to comment.