[Not an issue] NumberDecimal documentation

I’m not entirely sure how we can best utilize NumberDecimal. Is there any in-depth documentation?

What I want to be able to do is (a) read the NumberDecimal from the events (can do this, have tested it, it seems to resolve to a JSON object), (b) increment/decrement another value using it (haven’t figured out if this is possible yet, though it doesn’t look easy), and © manipulate it using a cloud function.

So, do they effectively resolve to a BigInt/BigNumber in cloud functions, and is it possible to use increment in conjunction with a NumberDecimal?

Thinking outside the box here. I have a solution to incrementing NumberDecimal (or in this case a wei string, which is easier), using a beforeSave function.

Moralis.Cloud.beforeSave(USER_DATA, async function (request) {
  const object = request.object;
  const incrementField = object.get(INCREMENT_FIELD)
  const incrementAmount = object.get(INCREMENT_AMOUNT)
  if (incrementField && incrementAmount) {
    const currBalance = object.get(incrementField) || '0'
    logger.info(`incrementing UserData ${incrementField} from ${currBalance} by ${incrementAmount}`)
    const newBal = (BigInt(currBalance) + BigInt(incrementAmount)).toString()
    logger.info(`incrementing UserData ${incrementField} newBal ${newBal}`)
    object.set(incrementField, newBal)
  } else {
    logger.info('saving UserData with no increment')
  }
  object.set(INCREMENT_FIELD, null)
  object.set(INCREMENT_AMOUNT, null)
});