-
Notifications
You must be signed in to change notification settings - Fork 17
fix: clean core types #4500
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
base: main
Are you sure you want to change the base?
fix: clean core types #4500
Conversation
Merging to
|
As you've now noticed by the failing tests, these generics are all used for type inference on the SDK. They provide the necessary context to augment the |
As far as I'm aware, TypeScript doesn't have something like Rust's |
Ah, I only tested the main project, I need to look at those then too. |
also want to add that sometimes typescript failing is a good thing: I’ll have to look into this better though |
Last week I noticed, while working on the tests, that the types could be better.
I looked at them, yesterday, and today. And am finding a lot of room for improvement.
There are many type parameters which are either not used, or in some cases incorrect.
There are also many “wrapper” types, which can be inlined, resulting in less code and shorter “stack” traces.
I am sharing this PR before it becomes bigger. It is already bigger than would be nice. But, there is still lot more to do. And it’s all tiny commits. So separate PRs would take a while to merge. I can do that though.