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
Incorrect Types when using in a TypeScript ESM project #144
Comments
I think the root cause is the same as this: microsoft/TypeScript#50690. |
I ran into this one today as well! What can I do to fix this? |
Seems like we must get TypeScript into "ESM" mode when importing I know two solutions:
Approach 2 is what safe-stable-stringify does. |
The problem with approach 1 is that it is difficult to output |
🕗 Version & Regression Information
1.2.0
⏯ Playground Link
https://stackblitz.com/edit/node-3rxg4d
npm install
.npm run build
. The error occurs.💻 Code
🙁 Actual behavior
I tried to run the code above from a TypeScript ESM package, this means:
"type": "module"
set inpackage.json
"module": "node16"
set intsconfig.json
But in such a project, the code does not compile:
Note that the compiled output does run as expected, so the only problem is the TypeScript compilation error.
🙂 Expected behavior
The code should compile.
The text was updated successfully, but these errors were encountered: