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

set module compiler option to node16 in tsconfig.base.json #5310

Open
1 task
david-luna opened this issue Jan 9, 2025 · 0 comments
Open
1 task

set module compiler option to node16 in tsconfig.base.json #5310

david-luna opened this issue Jan 9, 2025 · 0 comments
Assignees

Comments

@david-luna
Copy link
Contributor

david-luna commented Jan 9, 2025

Description

#5145 sets an combination of compiler options that some uses get as an error in their editors. Ref #5145 (comment)

I order to fix that we need to change module compiler option to node16 but doing it makes the compilation fail for some files since they have imports that do not conform the the new module resolution giving the following output.

npm run compile

api/test/common/context/NoopContextManager.test.ts:28:9 - error TS2349: This expression is not callable.
  Type 'typeof assert' has no call signatures.

28         assert(
           ~~~~~~

  api/test/common/context/NoopContextManager.test.ts:17:1
    17 import * as assert from 'assert';
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.

...

So along with the change we need a small refactor of these files to fix the import expression and the usage of the module if applies.

Checklist

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

No branches or pull requests

1 participant