bigint property

Decoder<BigInt> bigint
getter/setter pair

/////////////////////////////////////////////////////////////////////////// ////////////////////////////// Primitives ///////////////////////////////// ///////////////////////////////////////////////////////////////////////////

Implementation

static Decoder<BigInt> bigint = string
    .emap((s) => optionOf(BigInt.tryParse(s))
        .toEither(() => DecodingError('Could not parse BigInt: $s')))
    .handleErrorWith(
        (err) => Decoder.error(DecodingError.parsingFailure(err.reason)));