BigInt support has been added on TypeScript 3.2; make sure your version is compatible.

But on top of that, you need to decide how BigInt will be supported on the context of your script - will you provide polyfills, or will you only run your script on environments that are guaranteed to have BigInt support?

This means you will need esnext as your build target (likely on tsconfig.json's target field), since BigInt is not compatible with previous ECMAScript versions.

If you do include a BigInt polyfill, you can use esnext.bigint as part of the lib field during transpilation. This adds the needed definitions to the process.

Answer from zeh on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › BigInt
BigInt - JavaScript | MDN
A BigInt value, also sometimes just called a BigInt, is a bigint primitive, created by appending n to the end of an integer literal, or by calling the BigInt() function (without the new operator) and giving it an integer value or string value.
Discussions

How do I add a (number | bigint) to another (number | bigint), enforcing they they are of the same type?
E.g. as part of a function: const add = (a: T, b: T) => a + b; Edit: The above does not work and but since TypeScript is explicitly told that both parameters a and b are always of type T, that T is either number or bigint and both can use the + operator, I think this should work… Edit II, I was wrong: Because there’s no way to link the types of a and b without using a generic, whose constraints need to be a union to allow for number and bigint, what I was trying to express using my example above is actually not as strict as I’d like it to be… I played around a bit further but got nowhere, stick to overloading, like u/jydu suggests. More on reddit.com
🌐 r/typescript
19
7
September 14, 2023
Allow bigint as an index type because number is allowed too
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript ... The bigint type currently is not allowed as an index ... More on github.com
🌐 github.com
12
August 5, 2021
Define a sum function that accepts an array of numbers OR an array of bigints
What type signature have you tried? I've been out of TS for a bit, but I believe this'll work if you make your function generic, where your argument arr: T[] and T extends number | bigint More on reddit.com
🌐 r/typescript
21
5
January 11, 2024
Trying to create a floating point type?
You could represent 10.0000 as an object, such as {int: BigInt(10_0000), shift_10: 4}. This will let you store and report an arbitrary level of precision, though it will be more cumbersome to use than JS’s built-in floating-ish-point number type. More on reddit.com
🌐 r/typescript
23
5
November 13, 2023
🌐
TypeScript
typescriptlang.org › docs › handbook › release-notes › typescript-3-2.html
TypeScript: Documentation - TypeScript 3.2
This is achieved by using the ... destructuring pattern. ... BigInts are part of an upcoming proposal in ECMAScript that allow us to model theoretically arbitrarily large integers....
🌐
TutorialsPoint
tutorialspoint.com › home › javascript › javascript bigint: handling large integers
Typescript BigInt Vs Number
August 31, 2023 - JavaScript introduced the BigInt data type in response to these limitations; as its name suggests BigInt addresses the shortcomings of finite precision.
🌐
effect
effect-ts.github.io › effect › effect › BigInt.ts.html
BigInt.ts - effect
This module provides utility functions and type class instances for working with the bigint type in TypeScript.
🌐
W3Schools
w3schools.com › js › js_bigint.asp
W3Schools.com
BigInt is a JavaScript data type for handling and storing big integer values.
Find elsewhere
🌐
Medium
medium.com › @turingvang › ts1353-a-bigint-literal-must-be-an-integer-594af8288476
TS1353: A bigint literal must be an integer | by Turingvang | Medium
March 16, 2025 - BigInt is a built-in object in JavaScript (and consequently TypeScript) that allows representation of integers larger than Number.MAX_SAFE_INTEGER. However, the syntax for BigInt must be an integer followed by the n suffix.
🌐
Tektutorialshub
tektutorialshub.com › home › typescript › typescript bigint
Typescript Bigint - Tektutorialshub
March 15, 2023 - The bigint is a new primitive type in Typescript. It is available only if you target esnext in tsconfig.json. it represents the whole number. It can hold numbers larger than 253 – 1. The BigInt uses the arbitrary-precision arithmetic.
🌐
TypeScript
typescriptlang.org › play › 3-7 › fixits › big-number-literals.ts.html
TypeScript: Playground Example - Big number literals
const oneOverMax = 9007199254740992; ...eference/Global_Objects/BigInt TypeScript will now offer a fixit for number literals which are above 2^52 (positive / negative) which adds the suffix "n" which informs JavaScript that the type should be BigInt....
🌐
Smashing Magazine
smashingmagazine.com › 2019 › 07 › essential-guide-javascript-newest-data-type-bigint
The Essential Guide To JavaScript’s Newest Data Type: BigInt — Smashing Magazine
July 22, 2019 - The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Errors › BigInt_not_serializable
TypeError: BigInt value can't be serialized in JSON - JavaScript | MDN
September 10, 2025 - You are trying to serialize a BigInt value using JSON.stringify, which does not support BigInt values by default. Sometimes, JSON stringification happens implicitly in libraries, as part of data serialization.
🌐
Zod
zod.dev
Intro | Zod
Introduction to Zod - TypeScript-first schema validation library with static type inference
🌐
GitHub
github.com › microsoft › TypeScript › issues › 46395
Allow bigint as an index type because number is allowed too · Issue #46395 · microsoft/TypeScript
August 5, 2021 - Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript ... The bigint type currently is not allowed as an index type requiring an explicit string cast.
Author   CMCDragonkai
🌐
npm
npmjs.com › bigint
bigint
Print out the bigint instance in the requested base as a string.
      » npm install bigint
    
Published   Apr 18, 2013
Version   0.4.2
Author   James Halliday
🌐
DEV Community
dev.to › seanwelshbrown › using-javascript-s-bigint-data-type-4o74
Using JavaScript's BigInt Data Type - DEV Community
August 26, 2020 - It's worth noting that built in methods using the Math object in JavaScript will not work with BigInts, and that any arithmetic being done between a BigInt and a regular Number will not work— the Number must first be coerced into a BigInt as well.
🌐
AG Grid
ag-grid.com
AG Grid: High-Performance React Grid, Angular Grid ...
BigInt Support · Excel Export Security · Theme Builder - Import Theme · See release notesSee all changes · 10th December 2025 · Major · Version 35.0.0Read more → · Feature Highlights · Formulas · Row Group Dragging · Absolute Sorting · Column Selection ·