Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { Observable } from 'rxjs';
|
---|
| 9 | import { CollectionViewer } from './collection-viewer';
|
---|
| 10 | export declare abstract class DataSource<T> {
|
---|
| 11 | /**
|
---|
| 12 | * Connects a collection viewer (such as a data-table) to this data source. Note that
|
---|
| 13 | * the stream provided will be accessed during change detection and should not directly change
|
---|
| 14 | * values that are bound in template views.
|
---|
| 15 | * @param collectionViewer The component that exposes a view over the data provided by this
|
---|
| 16 | * data source.
|
---|
| 17 | * @returns Observable that emits a new value when the data changes.
|
---|
| 18 | */
|
---|
| 19 | abstract connect(collectionViewer: CollectionViewer): Observable<readonly T[]>;
|
---|
| 20 | /**
|
---|
| 21 | * Disconnects a collection viewer (such as a data-table) from this data source. Can be used
|
---|
| 22 | * to perform any clean-up or tear-down operations when a view is being destroyed.
|
---|
| 23 | *
|
---|
| 24 | * @param collectionViewer The component that exposes a view over the data provided by this
|
---|
| 25 | * data source.
|
---|
| 26 | */
|
---|
| 27 | abstract disconnect(collectionViewer: CollectionViewer): void;
|
---|
| 28 | }
|
---|
| 29 | /** Checks whether an object is a data source. */
|
---|
| 30 | export declare function isDataSource(value: any): value is DataSource<any>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.