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
Import Node type kills TypeScript performance #3257
Comments
I tried with different versions of TypeScript 5 too. And the same issue happens. But quickly checking the source, I don't see something wrong to be honest. I am also wondering if TypeScript itself is struggling with the generic Node types. So, am I the only one having this issue? |
I never encountered this issue and it isn't something special we are doing here. React for example also export a type called |
We tried the |
I probably have to create a simpler project with the same TS setup and see. I'll do that a bit later. |
Yeah, as expected on a small project it doesn't affect the performance. In our app, we have hundreds of files. It's the first that I see that, and it only affects files related to this |
Ok, some progress here. Looks like I've seen that you are using On the Looks like an issue on the immer side, so I'm closing this one. |
Describe the Bug
Doing
import type {Node} from "reactflow";
kills the TypeScript performance. Importing all other types looks fine.I feel like the conflict with the generic Node type may be the culprit.
This is my setup of TypeScript for the novelties of TS5.1. For the rest I am just using
ESNext
setup.PS: It happens with the last version of TypeScript within VSCode or IntelliJ. So it's definitely not an IDE issue. And it happens only on files that import "reactflow". All the other files work as fast as expected.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Well, just import type
Node
Expected behavior
Keep TS fast.
Screenshots or Videos
No response
Platform
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: