member_webapp/@overflow/sensor/store/detail/detail.state.ts

16 lines
525 B
TypeScript
Raw Normal View History

2018-05-24 06:44:13 +00:00
import { RPCClientError } from '@loafer/ng-rpc';
2018-05-02 08:09:39 +00:00
import { Sensor } from '@overflow/commons-typescript/model/sensor';
import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
export interface State extends EntityState<Sensor> {
error: RPCClientError | null;
isPending: boolean;
sensor: Sensor | null;
}
export const adapter: EntityAdapter<Sensor> = createEntityAdapter<Sensor>();
export const initialState: State = adapter.getInitialState({
error: null,
isPending: false,
sensor: null,
});