effect-io-ai

Package: effect
Module: SchemaGetter

SchemaGetter.BigInt

Coerces a value to bigint using the global BigInt() constructor.

When to use

Use when you need a schema getter to convert a present string, number, or boolean value to bigint.

Details

Example (Coercing to a bigint)

import { SchemaGetter } from "effect"

const toBigInt = SchemaGetter.BigInt<string>()
// Getter<bigint, string>

Signature

declare const BigInt: <E extends string | number | bigint | boolean>() => Getter<bigint, E>

Source

Since v4.0.0