ObservedValueUnionFromArray
type-alias
stable
Extracts a union of element types from an ObservableInput<any>[]
. If you have O extends ObservableInput<any>[]
and you pass in Observable<string>[]
or Promise<string>[]
you would get back a type of string
. If you pass in [Observable<string>, Observable<number>]
you would get back a type of string | number
.
type ObservedValueUnionFromArray<X> = X extends Array<ObservableInput<infer T>> ? T : never;
© 2015–2021 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/index/type-alias/ObservedValueUnionFromArray