Defjs
Core

struct.bigint

Struct that accepts a bigint or a bigint string and outputs a bigint.

@defjs/core · Function

Signature

function bigint(): Struct<bigint | string, bigint>;
  • Accepts a bigint, or a string that BigInt() can parse. A number is rejected.

  • Output is always a bigint; an unparsable string fails with invalid_type.

  • When encoded for the wire, the value becomes a decimal string.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao