W3cubDocs

/RxJS

race

function deprecated

Returns an Observable that mirrors the first source Observable to emit a next, error or complete notification from the combination of this Observable and supplied Observables.

Deprecation Notes

Deprecated in favor of static race.

race<T>(...observables: (Observable<T> | Observable<T>[])[]): MonoTypeOperatorFunction<T>

Parameters

observables

Type: (Observable | Observable[])[].

Returns

MonoTypeOperatorFunction<T>: An Observable that mirrors the output of the first Observable to emit an item.

Overloads

race(observables: Array<Observable<T>>): MonoTypeOperatorFunction<T>

Parameters

observables

Type: Array>.

Returns

MonoTypeOperatorFunction<T>

race(observables: Array<Observable<T>>): OperatorFunction<T, R>

Parameters

observables

Type: Array>.

Returns

OperatorFunction<T, R>

race(...observables: Array<Observable<T> | Array<Observable<T>>>): MonoTypeOperatorFunction<T>

Parameters

observables

Type: Array | Array>>.

Returns

MonoTypeOperatorFunction<T>

race(...observables: Array<Observable<any> | Array<Observable<any>>>): OperatorFunction<T, R>

Parameters

observables

Type: Array | Array>>.

Returns

OperatorFunction<T, R>

© 2015–2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/operators/race