facebook/idx

Cannot find name 'bigint'

Closed this issue · 6 comments

Type: Bug
Version: 2.5.4
Subject: Type Error
Environment: TypeScript 3.1.6

We are receiving the following error on build with the latest version (2.5.4).

ERROR in node_modules/idx/lib/idx.d.ts(52,21): error TS2304: Cannot find name 'bigint'.
node_modules/idx/lib/idx.d.ts(53,13): error TS2304: Cannot find name 'bigint'.

You need to upgrade to TypeScript 3.2

Hi @mohsen1
I got that already. I just wanted to make sure you are aware of the issue. After all, this is a breaking change for TypeScript users and the version number is increased just as if it is a patch. It will break compilations all over the world and people will have to take action.

If you want to fix this, you can publish a minor release (2.6.0) or, even better a major release (3.0.0), then revert the change and make another patch to the older version (2.5.5). Additionally, this should be documented well to avoid further misunderstandings.

With TypeScript and @types/ packages the stance is that your code will break with any change, including patch versions. idx is shipping it's own types so it's a bit different. That being said, the types here require some minimum version of TypeScript anyways. We're using conditional types that was introduced in TypeScript 3 for instance. We don't want to make TypeScript a peer dependency of idx either, you don't need to have TypeScript to use idx.

I'll leave it to package maintainers to decide. Removing 'bigint' will not break too many people vs. depending on at least TypeScript@3.2

I'm down to make the necessary changes for idx to be compatible with older versions of TypeScript, publish idx@2.5.5, and then revert those changes and publish idx@3.0.0.

Would either of you be down to make the minimal changes necessary for idx@2.5.5?

I just published idx@2.5.5 which includes #80. Thanks everyone!

Thanks @mohsen1 and @yungsters. It is most appreciated.