Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
380 bytes
|
Line | |
---|
1 | import { Observable } from '../Observable';
|
---|
2 | import { 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 | */
|
---|
8 | export 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.