metadata service

This commit is contained in:
William Welling
2017-10-12 19:08:03 -05:00
parent c9338e2626
commit f4c0df176e
25 changed files with 1018 additions and 170 deletions

View File

@@ -0,0 +1,23 @@
import { Action } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
export class MockStore<T> extends BehaviorSubject<T> {
constructor(private _initialState: T) {
super(_initialState);
}
dispatch = (action: Action): void => {
console.info();
}
select = <R>(pathOrMapFn: any): Observable<T> => {
return Observable.of(this.getValue());
}
nextState(_newState: T) {
this.next(_newState);
}
}