The boolean is a primitive type in Typescript. It represents a simple true/false value. They are implemented as numerical values with a single binary digit (i.e., 0 & 1). The Boolean is an object wrapper for a boolean value. Also, let us find the difference between Boolean vs boolean.
In this article, we will show you the difference between BigInt and number data types. And also when to use the BigInt data type
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. This article covers how to use bigInt, the arithmetic operations allowed, how to convert bigint to number and number to bigint, etc.
The Typescript number data type stores the numbers as a double-precision 64-bit number The Typescript has two data types to deal with the Numbers. One is a primitive number data type. The other one is BigInt, which is a recent addition. It does not have separate data types like integers, decimal, float as in the other languages. The number is a primitive data type. The Typescript also have Number object. We also have listed the difference between number Vs Number. The Numberobject has many properties & methods, which you can make use of and is listed at the end of the article.
The Infinity is a global property i.e. it is a variable in a global scope. The Infinity can be either POSITIVE_INFINITY & NEGATIVE_INFINITY. We can check whether the number is finite by using the isFinite method.