Hyperlinkv0.8.0-beta.28

SchemaRepresentation

SchemaRepresentation.$BigIntconsteffect/SchemaRepresentation.ts:1180
Schema.Struct<{
  readonly _tag: Schema.tag<"BigInt">
  readonly annotations: Schema.optional<
    Schema.decodeTo<
      Schema.$Record<Schema.String, Schema.Unknown>,
      Schema.$Record<
        Schema.String,
        Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>
      >,
      never,
      never
    >
  >
  readonly checks: Schema.$Array<
    Schema.Codec<
      Check<
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isGreaterThanBigInt">
              readonly exclusiveMinimum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isGreaterThanOrEqualToBigInt">
              readonly minimum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isLessThanBigInt">
              readonly exclusiveMaximum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isLessThanOrEqualToBigInt">
              readonly maximum: Schema.BigInt
            },
            "Type"
          >
        | {
            readonly _tag: "isBetweenBigInt"
            readonly minimum: bigint
            readonly maximum: bigint
            readonly exclusiveMinimum?: boolean | undefined
            readonly exclusiveMaximum?: boolean | undefined
          }
      >,
      Check<
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isGreaterThanBigInt">
              readonly exclusiveMinimum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isGreaterThanOrEqualToBigInt">
              readonly minimum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isLessThanBigInt">
              readonly exclusiveMaximum: Schema.BigInt
            },
            "Type"
          >
        | Schema.Struct.ReadonlySide<
            {
              readonly _tag: Schema.tag<"isLessThanOrEqualToBigInt">
              readonly maximum: Schema.BigInt
            },
            "Type"
          >
        | {
            readonly _tag: "isBetweenBigInt"
            readonly minimum: bigint
            readonly maximum: bigint
            readonly exclusiveMinimum?: boolean | undefined
            readonly exclusiveMaximum?: boolean | undefined
          }
      >,
      never,
      never
    >
  >
}>

Schema for the BigInt representation node.

When to use

Use to encode, decode, or validate serialized BigInt representation nodes, not application bigint values.

Details

Accepts representation nodes with _tag: "BigInt", optional annotations, and bigint-specific validation metadata in checks.

export const $BigInt = Schema.Struct({
  _tag: Schema.tag("BigInt"),
  annotations: Schema.optional($Annotations),
  checks: Schema.Array(makeCheck($BigIntMeta, "BigInt"))
}).annotate({ identifier: "BigInt" })
Referenced by 1 symbols