@equinor/fusion-observable
Version:
20 lines (19 loc) • 701 B
TypeScript
import { type ObservableInput } from 'rxjs';
/**
* Checks if the provided input is an ObservableInput<T>.
*
* ObservableInput<T> is a type that includes:
* - Observable<T>
* - InteropObservable<T>
* - PromiseLike<T>
* - ArrayLike<T>
* - Iterable<T>
* - AsyncIterable<T>
* - ReadableStreamLike<T>
*
* @template T The type of the value emitted or resolved by the input.
* @param input The value to check.
* @returns True if the input matches ObservableInput<T>, otherwise false.
*/
export declare function isObservableInput<T>(input: ObservableInput<T>): input is ObservableInput<T>;
export declare function isObservableInput(input: any): input is ObservableInput<unknown>;