2019-09-19 10:40:16 +09:00
|
|
|
import { Type } from '@angular/core';
|
|
|
|
import { Action, combineReducers, Selector, createSelector } from '@ngrx/store';
|
|
|
|
|
|
|
|
import * as VersionInfoStore from './version-info';
|
|
|
|
|
|
|
|
export interface State {
|
|
|
|
versionInfo: VersionInfoStore.State;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const effects: Type<any>[] = [VersionInfoStore.Effects];
|
|
|
|
|
|
|
|
export function reducers(state: State | undefined, action: Action) {
|
|
|
|
return combineReducers({
|
2019-09-19 11:22:49 +09:00
|
|
|
versionInfo: VersionInfoStore.reducer
|
2019-09-19 10:40:16 +09:00
|
|
|
})(state, action);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function selectors<S>(selector: Selector<any, State>) {
|
|
|
|
return {
|
|
|
|
VersionInfoSelector: VersionInfoStore.selectors(
|
|
|
|
createSelector(
|
|
|
|
selector,
|
|
|
|
(state: State) => state.versionInfo
|
|
|
|
)
|
|
|
|
)
|
|
|
|
};
|
|
|
|
}
|