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

Module 04, error when trying to compile a single typescript file #14

Open
Yagi91 opened this issue Feb 14, 2023 · 1 comment
Open

Module 04, error when trying to compile a single typescript file #14

Yagi91 opened this issue Feb 14, 2023 · 1 comment

Comments

@Yagi91
Copy link

Yagi91 commented Feb 14, 2023

No problem calling tsc on the folder level to build a separate JS file but an error is encountered when calling the tsc on a specific file like tsc module04.ts

Error displayed below

../../../../../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: {
               ~~~~~~~~~~~

  ../../../../../../../../AppData/Roaming/npm/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
@AdalbertPungu
Copy link

Try following the instructions in the documentation and type this into Terminal : tsc module04.ts

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