This commit is contained in:
Михаил Капелько
2023-12-28 15:46:33 +03:00
parent f27c52305d
commit 514e06e8fe
6 changed files with 22 additions and 14 deletions

View File

@@ -5,18 +5,18 @@ public extension Bus {
var subscriptions = [AnyCancellable]()
public init(
_ handler: @escaping ((Src) -> Dst?),
_ keyIn: String,
_ keyOut: String,
_ handler: @escaping ((Src) -> Dst?),
opt: [Option] = []
) {
Bus.process([keyIn], keyOut, handler, opt: opt, sub: &subscriptions)
}
public init(
_ handler: @escaping ((Src) -> Dst?),
_ keysIn: Set<String>,
_ keyOut: String,
_ handler: @escaping ((Src) -> Dst?),
opt: [Option] = []
) {
Bus.process(keysIn, keyOut, handler, opt: opt, sub: &subscriptions)