source: trip-planner-front/node_modules/rxjs/src/internal/util/isObservable.ts@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 380 bytes
Line 
1import { Observable } from '../Observable';
2import { ObservableInput } from '../types';
3
4/**
5 * Tests to see if the object is an RxJS {@link Observable}
6 * @param obj the object to test
7 */
8export function isObservable<T>(obj: any): obj is Observable<T> {
9 return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
10}
Note: See TracBrowser for help on using the repository browser.