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';
|
2018-04-18 11:28:53 +00:00
|
|
|
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,
|
|
|
|
});
|