microsoft / TypeScript-Handbook

Deprecated, please use the TypeScript-Website repo instead
https://github.com/microsoft/TypeScript-Website
Apache License 2.0
4.88k stars 1.13k forks source link

Add `bigint` to primitive list #1126

Closed dosentmatter closed 4 years ago

dosentmatter commented 4 years ago

bigint is a primitive since is not assignable to object. Not sure if we want this here though since there is no description for newer types such as bigint or unknown in "Basic Types.md". bigint is introduced in TS@3.2 page.

const foo: object = BigInt(100); // Type 'bigint' is not assignable to type 'object'.ts(2322)

https://mariusschulz.com/blog/the-object-type-in-typescript

orta commented 4 years ago

Agree, thanks!