export const useAsRecord = (map?: Map | null) => { const myRecord: Record = {}; map?.forEach((value, key) => { myRecord[key] = value; }); return myRecord; };