The TypeScript types were behaving very slow and after some digging it was due to a circular reference from ReturnType<TV>. Swapping that out with TVReturnType drastically improves the experience in the editor.
There are a bunch of other issues with the types related to missing generic arguments and such that I plan on helping fix in future PRs, but wanted to get this out there since it's a small fix with a big performance improvement.
Additional context
The videos below show the difference in time for errors appearing before and after this change.
Description
The TypeScript types were behaving very slow and after some digging it was due to a circular reference from
ReturnType<TV>
. Swapping that out withTVReturnType
drastically improves the experience in the editor.There are a bunch of other issues with the types related to missing generic arguments and such that I plan on helping fix in future PRs, but wanted to get this out there since it's a small fix with a big performance improvement.
Additional context
The videos below show the difference in time for errors appearing before and after this change.
Before
https://user-images.githubusercontent.com/25914066/234464472-79fb3025-0448-48aa-bdee-43781b6c4111.mov
After
https://user-images.githubusercontent.com/25914066/234464481-0a6dbc7b-7c83-4e95-8ffb-260dd5ed75e5.mov
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).