Preview:ts import assert from "assert" interface Bounds { min: bigint max: bigint } export class BitSizedBigint { readonly #bits: number public readonly value: bigint readonly boundaries: Bounds constructor( bits: number, value: bigint, signed: boolean | Bounds ) { assert( bits > 0, "BitSizedBigint: bits must be greater than 0" ) this.#bits = bits this.value = value if (typeof signed === "boolean") { if (signed) ...
You can choose specific lines to embed by selecting them before copying the link.