/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ConnectableObservable } from 'rxjs'; export class DataSource { } /** Checks whether an object is a data source. */ export function isDataSource(value) { // Check if the value is a DataSource by observing if it has a connect function. Cannot // be checked as an `instanceof DataSource` since people could create their own sources // that match the interface, but don't extend DataSource. We also can't use `isObservable` // here, because of some internal apps. return value && typeof value.connect === 'function' && !(value instanceof ConnectableObservable); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1zb3VyY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL2NvbGxlY3Rpb25zL2RhdGEtc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxxQkFBcUIsRUFBYSxNQUFNLE1BQU0sQ0FBQztBQUd2RCxNQUFNLE9BQWdCLFVBQVU7Q0FtQi9CO0FBRUQsaURBQWlEO0FBQ2pELE1BQU0sVUFBVSxZQUFZLENBQUMsS0FBVTtJQUNyQyx1RkFBdUY7SUFDdkYsdUZBQXVGO0lBQ3ZGLDBGQUEwRjtJQUMxRix1Q0FBdUM7SUFDdkMsT0FBTyxLQUFLLElBQUksT0FBTyxLQUFLLENBQUMsT0FBTyxLQUFLLFVBQVUsSUFBSSxDQUFDLENBQUMsS0FBSyxZQUFZLHFCQUFxQixDQUFDLENBQUM7QUFDbkcsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4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