import { Map } from "immutable"; import { ValueType, CallStatus } from "../enums"; import { StoreValue } from "../types/ValueMap"; const CreateImmutable = (value: any, staticKey?: boolean) => { const type = staticKey ? ValueType.STATIC_VALUE : ValueType.STORE_VALUE; const status = staticKey ? CallStatus.NONE : CallStatus.INITIAL; const props: StoreValue = { type, status, value }; return Map(props); }; export default CreateImmutable;