16 lines
525 B
TypeScript
16 lines
525 B
TypeScript
import { RPCClientError } from '@loafer/ng-rpc';
|
|
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,
|
|
});
|