Observable

class Observable<out T : JsAny?>(callback: SubscribeCallback<T>)(source)

Constructors

Link copied to clipboard
constructor(callback: SubscribeCallback<T>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun catch(callback: (JsError) -> @UnsafeVariance T): Observable<T>
Link copied to clipboard
fun drop(n: Int): Observable<T>
Link copied to clipboard
suspend fun every(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): Boolean
Link copied to clipboard
fun everyAsync(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): Promise<JsBoolean>
Link copied to clipboard
fun filter(predicate: (T) -> Boolean): Observable<T>
Link copied to clipboard
fun finally(callback: VoidFunction): Observable<T>
Link copied to clipboard
suspend fun find(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): T
Link copied to clipboard
fun findAsync(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): Promise<T>
Link copied to clipboard
suspend fun first(options: SubscribeOptions? = definedExternally): T
Link copied to clipboard
fun firstAsync(options: SubscribeOptions? = definedExternally): Promise<T>
Link copied to clipboard
fun <R : JsAny?> flatMap(transform: (T) -> ReadonlyArray<R>): Observable<R>
fun <R : JsAny?> flatMap(transform: (T) -> AsyncIterable<R>): Observable<R>
fun <R : JsAny?> flatMap(transform: (T) -> JsIterable<R>): Observable<R>
fun <R : JsAny?> flatMap(transform: (T) -> Observable<R>): Observable<R>
Link copied to clipboard
fun forEach(action: (item: T) -> Unit, options: SubscribeOptions? = definedExternally)
Link copied to clipboard
fun forEachAsync(action: (item: T) -> Unit, options: SubscribeOptions? = definedExternally): Promise<Void>
Link copied to clipboard
fun inspect(callback: (value: T) -> Unit): Observable<T>
Link copied to clipboard
suspend fun last(options: SubscribeOptions? = definedExternally): T
Link copied to clipboard
fun lastAsync(options: SubscribeOptions? = definedExternally): Promise<T>
Link copied to clipboard
fun <R : JsAny?> map(transform: (T) -> R): Observable<R>
Link copied to clipboard
suspend fun <U : JsAny?> reduce(    operation: (previousValue: U, currentValue: T, currentIndex: Int) -> U,     initialValue: U,     options: SubscribeOptions? = definedExternally): U
Link copied to clipboard
fun <U : JsAny?> reduceAsync(    operation: (previousValue: U, currentValue: T, currentIndex: Int) -> U,     initialValue: U,     options: SubscribeOptions? = definedExternally): Promise<U>
Link copied to clipboard
suspend fun some(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): Boolean
Link copied to clipboard
fun someAsync(predicate: (T) -> Boolean, options: SubscribeOptions? = definedExternally): Promise<JsBoolean>
Link copied to clipboard
fun subscribe(callback: (value: T) -> Unit, options: SubscribeOptions? = definedExternally)

Subscribes to the sequence with callbacks

fun subscribe(observer: SubscriptionObserver<T>, options: SubscribeOptions? = definedExternally)

Subscribes to the sequence with an observer

Link copied to clipboard
fun <R : JsAny?> switchMap(transform: (T) -> ReadonlyArray<R>): Observable<R>
fun <R : JsAny?> switchMap(transform: (T) -> Observable<R>): Observable<R>
Link copied to clipboard
fun take(n: Int): Observable<T>
Link copied to clipboard
fun takeUntil(notifier: ReadonlyArray<*>): Observable<T>
fun takeUntil(notifier: AsyncIterable<*>): Observable<T>
fun takeUntil(notifier: JsIterable<*>): Observable<T>
fun takeUntil(notifier: Promise<*>): Observable<T>
fun takeUntil(notifier: Observable<*>): Observable<T>
Link copied to clipboard
suspend fun toArray(options: SubscribeOptions? = definedExternally): ReadonlyArray<T>
Link copied to clipboard
fun toArrayAsync(options: SubscribeOptions? = definedExternally): Promise<ReadonlyArray<T>>