Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

isObservable.ts 380B

12345678910
  1. import { Observable } from '../Observable';
  2. import { ObservableInput } from '../types';
  3. /**
  4. * Tests to see if the object is an RxJS {@link Observable}
  5. * @param obj the object to test
  6. */
  7. export function isObservable<T>(obj: any): obj is Observable<T> {
  8. return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
  9. }