anvil/striker-ui/lib/api_converters/toAnvilMemoryCalcable.ts

16 lines
364 B
TypeScript

const toAnvilMemoryCalcable = (data: AnvilMemory): AnvilMemoryCalcable => {
const { allocated: rAllocated, reserved: rReserved, total: rTotal } = data;
const allocated = BigInt(rAllocated);
const reserved = BigInt(rReserved);
const total = BigInt(rTotal);
return {
allocated,
reserved,
total,
};
};
export default toAnvilMemoryCalcable;