break_eternity.js icon indicating copy to clipboard operation
break_eternity.js copied to clipboard

lambert-w changes and fix #142

Open 1231234md5 opened this issue 2 years ago • 8 comments

1231234md5 avatar Jan 13 '23 14:01 1231234md5

Can you make your changes to the typescript version, please?

https://github.com/Patashu/break_eternity.js/blob/master/src/index.ts

Then you can run yarn bili src/index.ts to compile break_eternity.js and the other three files.

(Or if you can't figure out how to install bili, it took me a while, I can do that part once you're done. I had to update npm so I could update node so I can install yarn so I can install bili. I hate Javascript, lol.)

Patashu avatar Jan 13 '23 23:01 Patashu

Wait, is there bigint in typescript? I only know expressions like 123456n is valid in javascript.

1231234md5 avatar Jan 14 '23 01:01 1231234md5

...I have no idea!

Is typescript just not compatible with bigint, then?

Patashu avatar Jan 14 '23 01:01 Patashu

I just don't know whether bigint is compatitible in typescript.

1231234md5 avatar Jan 14 '23 01:01 1231234md5

BigInt is available is TypeScript since 3.2. I'm not sure if it works with whatever ECMAScipt version is targeted though.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#bigint

Naruyoko avatar Jan 14 '23 06:01 Naruyoko

So I must do 25% more work than before(doing typescript)?

1231234md5 avatar Jan 14 '23 09:01 1231234md5

compatible

Typescript is a superset of JavaScript, it is compatible. But because you set target to es6 typescript only includes declarations for <= ES6 APIs but bigint is a ES2020 feature.

jakub791 avatar Feb 10 '23 22:02 jakub791

BigInt is available is TypeScript since 3.2. I'm not sure if it works with whatever ECMAScipt version is targeted though.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#bigint

We are targetting ES6 (AKA ES2015) while bigint is a ES2020 feature

jakub791 avatar Feb 10 '23 22:02 jakub791