import { LAB_ACTIONS } from '~/redux/lab/constants'; import { labSetList } from '~/redux/lab/actions'; import { ILabState } from '~/redux/lab/types'; type LabHandler any> = ( state: Readonly, payload: ReturnType ) => Readonly; const setList: LabHandler = (state, { list }) => ({ ...state, list: { ...state.list, ...list, }, }); export const LAB_HANDLERS = { [LAB_ACTIONS.SET_LIST]: setList, };