{"record":{"id":"33918fc4538c8cce","repo":"denoland/deno","slug":"value-must-be-a-bigint-received-typeof-value","errorCode":null,"errorMessage":"Value must be a bigint: received ${typeof value}","messagePattern":"Value must be a bigint: received (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":732,"sourceCode":"    }\n\n    if (operations.length === 0) {\n      return \"AtomicOperation (empty)\";\n    }\n\n    return `AtomicOperation\\n${ArrayPrototypeJoin(operations, \"\\n\")}`;\n  }\n}\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() {","sourceCodeStart":714,"sourceCodeEnd":750,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L714-L750","documentation":"Error \"Value must be a bigint: received ${typeof value}\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:732 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"}