toBigInt method

NumberBuilder toBigInt()

Transform the value to a BigInt.

Implementation

NumberBuilder toBigInt() {
  // Represent BigInt coercion using double_ slot to avoid new enum value (keeps simplicity)
  if (chain.coercedToDouble) return NumberBuilder(chain: chain);
  chain.setTransform(CoercionKind.double_, (child) => tr.toBigInt(child));
  return NumberBuilder(chain: chain);
}