23 lines
635 B
TypeScript
23 lines
635 B
TypeScript
|
import { RPCClientError } from '@loafer/ng-rpc/protocol';
|
||
|
|
||
|
import { DiscoveryStartInfo } from '../../model';
|
||
|
|
||
|
export interface State {
|
||
|
isStart: boolean;
|
||
|
error: RPCClientError | null;
|
||
|
isPending: boolean;
|
||
|
discoveryStartInfo: DiscoveryStartInfo | null;
|
||
|
}
|
||
|
|
||
|
export const initialState: State = {
|
||
|
isStart: false,
|
||
|
error: null,
|
||
|
isPending: false,
|
||
|
discoveryStartInfo: null,
|
||
|
};
|
||
|
|
||
|
export const isStart = (state: State) => state.isStart;
|
||
|
export const getDiscoveryStartInfo = (state: State) => state.discoveryStartInfo;
|
||
|
export const getError = (state: State) => state.error;
|
||
|
export const isPending = (state: State) => state.isPending;
|