(value: any)
| 32 | |
| 33 | /** Checks whether an object is a data source. */ |
| 34 | export function isDataSource(value: any): value is DataSource<any> { |
| 35 | // Check if the value is a DataSource by observing if it has a connect function. Cannot |
| 36 | // be checked as an `instanceof DataSource` since people could create their own sources |
| 37 | // that match the interface, but don't extend DataSource. We also can't use `isObservable` |
| 38 | // here, because of some internal apps. |
| 39 | return value && typeof value.connect === 'function' && !(value instanceof ConnectableObservable); |
| 40 | } |
no outgoing calls
no test coverage detected