import { Observable } from 'rxjs'; export interface Datasource { /** * Data stream */ data$: Observable; /** * Observable indicating if data is currently fetched from remote source */ fetchingData$: Observable; /** * Connects the data with the datasource and sets also the data * @param data */ connect(data: T[]): void; connect(data: Observable): void; /** * Returns a snapshot of the current data */ getDataSnapshot(): T[] | null; }