import { RPCClientError } from '@loafer/ng-rpc'; import { Selector, createSelector } from '@ngrx/store'; import { createEntityAdapter, EntityState } from '@loafer/ng-entity'; import { MetaCrawler } from '@overflow/commons-typescript/model/meta'; export const metaCrawlerEntityAdapter = createEntityAdapter(); export interface State extends EntityState { pending: boolean; } export const initialState: State = metaCrawlerEntityAdapter.getInitialState({ pending: false, }); export function getSelectors(selector: Selector) { return { ...metaCrawlerEntityAdapter.getSelectors(selector), selectPending: createSelector(selector, (state: State) => state.pending), }; }