Validates and converts the input data to a BigInt.

  • Parameters

    • data: Input

      Either a number or a string representing a non-negative integer.

    • context: string

      A string representing the context in which this function is used, to create meaningful error messages.

    Returns bigint

    The input data converted to a BigInt.