buffer icon indicating copy to clipboard operation
buffer copied to clipboard

Switch `BigInt` -> `bigint`

Open elibarzilay opened this issue 4 years ago • 4 comments

I'm from the group that works on TS --- we ran into a PR on DT that suspiciously required ESNext.BigInt, and it looks like it's required by the types declared here.

The thing is that BigInt should be replace by bigint, in the same way that number and string should be used instead of Number and String.

This should also fix #296.

elibarzilay avatar Jul 09 '21 21:07 elibarzilay

Does anyone have a status on this PR?

dekadentno avatar Aug 06 '21 19:08 dekadentno

I verified this PR in my local.

nodejs: 12.22.2 angular: 11.0.1 @types/node: 12.12.2

leolcao avatar Aug 29 '21 01:08 leolcao

i face the error on "typescript": "~4.3.5"

the errors
Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:23:38 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

23     readBigUInt64LE(offset: number): BigInt;
                                        ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:24:38 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

24     readBigUInt64BE(offset: number): BigInt;
                                        ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:30:37 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

30     readBigInt64LE(offset: number): BigInt;
                                       ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:31:37 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

31     readBigInt64BE(offset: number): BigInt;
                                       ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:45:54 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

45     writeBigUInt64LE(value: number, offset: number): BigInt;
                                                        ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:46:54 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

46     writeBigUInt64BE(value: number, offset: number): BigInt;
                                                        ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:52:53 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

52     writeBigInt64LE(value: number, offset: number): BigInt;
                                                       ~~~~~~


Error: ../extern-control-utils/node_modules/Buffer/index.d.ts:53:53 - error TS2583: Cannot find name 'BigInt'. Do you need to change your tar
get library? Try changing the 'lib' compiler option to 'es2020' or later.

53     writeBigInt64BE(value: number, offset: number): BigInt;
                                                       ~~~~~~

Lyoko-Jeremie avatar Oct 18 '21 06:10 Lyoko-Jeremie

@feross could you please merge this PR? :)

Thank you!

TimoGlastra avatar Oct 18 '21 13:10 TimoGlastra

Why this is closed? was never merged

ZumelzuR avatar Feb 13 '23 15:02 ZumelzuR

@ZumelzuR, sorry, I made some cleanup of my forks a while ago, and GH took it as a hint to close the PR. But the change is still recorded here, in case @feross wants to do the fix...

elibarzilay avatar Feb 13 '23 15:02 elibarzilay