Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript not compiling #453

Open
ZenLearner opened this issue Mar 18, 2024 · 1 comment
Open

Typescript not compiling #453

ZenLearner opened this issue Mar 18, 2024 · 1 comment

Comments

@ZenLearner
Copy link

I am (happily) stuck with the 2021 javascript version as when I try the 2023 typescript version I get errors. I tried compiling with little success , must admit that I have 0 experience compiling typescript. But I tried external ones like Google and still errors while compiling.

Any suggestions? I have tried for a couple of months to solve the issue, but so far the 2021 version is best... BTW it is the one used in the ChessBoard2 demo site... (examining the source code of THAT site)

Thanks, a marvellous piece of code...

@grondilu
Copy link

I had issues compiling too :

$ node_modules/.bin/tsc src/chess.ts 
node_modules/@types/node/globals.d.ts:72:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; abort(reason?: any): AbortSignal; timeout(milliseconds: number): AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; }'.

72 declare var AbortSignal: {
               ~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:2071:13
    2071 declare var AbortSignal: {
                     ~~~~~~~~~~~
    'AbortSignal' was also declared here.


Found 1 error in node_modules/@types/node/globals.d.ts:72

It was solved by upgrading the modules

$ npm upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants