MCPcopy Index your code
hub / github.com/angular/components / isDataSource

Function isDataSource

src/cdk/collections/data-source.ts:34–40  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

32
33/** Checks whether an object is a data source. */
34export 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}

Callers 8

_switchDataSourceMethod · 0.90
_observeRenderChangesMethod · 0.90
ngOnDestroyMethod · 0.90
ngOnDestroyMethod · 0.90
_switchDataSourceMethod · 0.90
_observeRenderChangesMethod · 0.90
cdkVirtualForOfMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected