我低于RxSwift
的构建错误,
func testFlatMap() {
let bag = DisposeBag()
let subject = PublishSubject<String>.init()
subject.flatMap({ (value) -> String in
PublishSubject.just(value)
}).subscribe(
onNext: { value in
print(value)
}
).disposed(by: bag)
subject.on(.next("Test"))
}
实例方法'flatMap'要求'String'符合'ObservableConvertibleType'
我想念什么?
subject.flatMap({ (value) -> String in
PublishSubject.just(value)
})