-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Update TypeScript to 4.2+ #5598
Comments
Hey, could you please show us some false positive errors? IMO, downgrading is not a good option. |
Actually, I can't seem to be able to reproduce those errors 😅 But I was talking about upgrading, not downgrading (currently, the editor uses TS@4.1.2) |
Ah sorry, I misunderstood that. Ooops. |
There is a working project which fails on codesandbox: https://codesandbox.io/s/github/ng-mocks/examples?file=/src/test.spec.ts The same project on SB works (but requires optional dependencies): https://stackblitz.com/github/ng-mocks/examples?file=src/test.spec.ts |
Aha, so in my case it was actually about core-js: |
It's now getting seriously out of date... 4.5.0 adds support for node12/nodenext native module resolution... A huge deal for interoperability between CJS/ESM node code and ts code. This is the Nov 18th, 2020 version CSB is using: https://github.com/Microsoft/TypeScript/tree/v4.1.2 This is creating lots of false positive UI errors not only in tsconfig, but throughout the code as imports can't resolve properly when the new tsconfig.json format is not supported. I would consider this a bug, technically a breaking one. |
Here is a small sampling of the litter of false-positive flags that almost make me want to disable IDE type checking... these are caused when I use node12 in compilerConfig.module and/or moduleResolution. These errors don't occur on the up to date version of TypeScript that the container is actually running. As you can see in the terminal, TypeScript 4.5.0 compiles without errors or warnings: Another one related to how TS 4.5 supports native .mjs loading... which some modules export whenever you turn on node ESM. Previously TS just ignored that for the most part... but with the node12/nodenext option set in compilerOptions.module... TS 4.1 breaks, TS 4.5 thrives. |
Hey @rayfoss - We've now pushed a fix for this - please could you confirm whether everything is working as expected now? :) |
Well, it's now using 4.4.4, which is nice. But it's still ignoring the version included in the Edit: Adding the {
"typescript.tsdk": "/sandbox/node_modules/typescript/lib"
} or {
"typescript.tsdk": "./node_modules/typescript/lib"
} |
I think this issue can be closed, since TS has been upgraded to v4.4.4 👍 Now ofc, it would be even better if one could select the TS version of its choice, but it's discussed in #942 |
Thanks @acd02 - I've got being able to change the version as a feature request on our end as well :) |
🌈 Feature
Hello, would it be possible to bump the TS version used by the editor to 4.2+ please, to avoid some false positive errors to occur ^^
The text was updated successfully, but these errors were encountered: