Remove the As type infer to make intellisense faster
See original GitHub issueWith latest release typescript intellisense is still very slow
I did some investigation and the problem is the ComponentWithAs
type, i tried tweaking that types removing the As
generic argument and everything becomes super smooth, making intellisense instantaneous
The as
generic argument delays intellisense even if you son’t use it, the delay is about 1000ms
average for me
I think we should remove the as generic and instead encourage people to use the new chakra.tag
approach
The as
type infer approach could be added maybe in the future, we shouldn’t add it in the 1.0
release or it will be impossible to remove (because of breaking changes) and it will make everyone experience worse
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to infer or provide intellisense for parameter types of ...
I have tried: type BrowserWindowOnEvents = Parameters<InstanceType<typeof Electron.BrowserWindow>['on']>[0];. But that only gives, at least for Intellisense, ...
Read more >IntelliSense in Visual Studio Code
If you prefer, you can turn off IntelliSense while you type. See Customizing IntelliSense below to learn how to disable or customize VS...
Read more >Two ways you can take advantage of types in JavaScript ...
This blog post describes how you can enable javascript intellisense and design time error highlighting without TypeScript.
Read more >Can you disable type inference for variable declarations? : r/rust
The reason is, yes I can see the variable types on the IDE, but git, vim, nano and company do not have a...
Read more >programming languages - What's the tradeoff for type inference?
Languages with opt-out type inference strike an agreeable balance between the ... you're trying to do, harming autocomplete and similar helpers during the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As much as I love having the type safety, I wouldn’t mind going back to the chakra v0 way if that meant a more responsive dev experience.
Thanks for reporting this @remorses. I would rather try to improve the IntelliSense a bit more instead of removing
as
prop support completely.I also agree with @santialbo, we need to keep the DX very close to v0.8 as much as we can.
As a first attempt, @with-heart and I worked on improvements here #1627. @remorses can you check it out to see if you notice any boost in IntelliSense speed?