{"record":{"id":"1af1468eb2d77fca","repo":"denoland/deno","slug":"value-must-fit-in-a-64-bit-unsigned-integer","errorCode":null,"errorMessage":"Value must fit in a 64-bit unsigned integer","messagePattern":"Value must fit in a 64-bit unsigned integer","errorType":"exception","errorClass":"RangeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":740,"sourceCode":"}\n\nconst MIN_U64 = BigInt(\"0\");\nconst MAX_U64 = BigInt(\"0xffffffffffffffff\");\n\nclass KvU64 {\n  value: bigint;\n\n  constructor(value: bigint) {\n    if (typeof value !== \"bigint\") {\n      throw new TypeError(`Value must be a bigint: received ${typeof value}`);\n    }\n    if (value < MIN_U64) {\n      throw new RangeError(\n        `Value must be a positive bigint: received ${value}`,\n      );\n    }\n    if (value > MAX_U64) {\n      throw new RangeError(\"Value must fit in a 64-bit unsigned integer\");\n    }\n    this.value = value;\n    ObjectFreeze(this);\n  }\n\n  valueOf() {\n    return this.value;\n  }\n\n  toString() {\n    return BigIntPrototypeToString(this.value);\n  }\n\n  get [SymbolToStringTag]() {\n    return \"Deno.KvU64\";\n  }\n\n  [SymbolFor(\"Deno.privateCustomInspect\")](inspect, inspectOptions) {","sourceCodeStart":722,"sourceCodeEnd":758,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L722-L758","documentation":"Error \"Value must fit in a 64-bit unsigned integer\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:740 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}