@documment/mmp.ui.data
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.1.
20 lines (19 loc) • 715 B
TypeScript
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/take';
import { Goal } from '@documment/mmp.core';
import { DataPublisher } from '../../pubsub/publishers/data.publisher';
import { ApplicationDataState } from '../../app-data.state';
export declare class GoalWarehouse {
private publisher;
private store;
constructor(publisher: DataPublisher, store: Store<ApplicationDataState>);
refresh(goals: Goal[]): void;
remove(goal: Goal): void;
upsert(goal: Goal): void;
state(): Goal[];
stateById(goalId: number): Goal;
watchAll(): Observable<Goal[]>;
watchById(goalId: number): Observable<Goal>;
private subscribe();
}