bigint

This type represents arbitrary-precision integers. It can hold integers with an arbitrary number of digits, making it useful for working with very large numbers with precision.
Example:

Javascript




// Define a bigint variable
const myBigint: bigint = 1234567890123456789012345678901234567890;
  
console.log(myBigint);


Output:

output

TypeScript Less Common Primitives Type

TypeScript Less Common Primitives Type offers a rich set of primitive types to represent data. While most developers are familiar with types like number, string, boolean, and symbol, TypeScript also provides less common primitive types that can be incredibly useful in specific scenarios.

These are some Less Common Primitives Types:

Table of Content

  • bigint
  • Symbol

Similar Reads

bigint

This type represents arbitrary-precision integers. It can hold integers with an arbitrary number of digits, making it useful for working with very large numbers with precision.Example:...

Symbol

...