Skip to content

Documentation / @eventkit/base / ObservedValueOf

Type Alias: ObservedValueOf<O>

ts
type ObservedValueOf<O> = O extends AsyncObservableInput<infer T> ? T : never;

Extracts the type from an AsyncObservableInput<any>. If you have O extends AsyncObservableInput<any> and you pass in AsyncObservable<number>, or Promise<number>, etc, it will type as number.

Type Parameters

Type ParameterDescription
OThe type thats emitted by the observable type

Released under the MIT License.