-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Named Specta types in select! and include! - Feature Request #216
Comments
Interesting idea but I'm not sure I'm onboard. At Spacedrive we've found that defining component prop types in a way that is decoupled from selection types is more flexible and a better dx, but I'm curious what your use case is? |
|
Hi i Noticed update now |
I assume you're talking about Erudio, so I checked how you're doing tests and noticed that you're mocking rspc responses. That makes sense, but rather than pass in the types to getData manually I'd suggest using rspc's inferProcedureResult helpers. That way you wouldn't need to use the generated types for include/select, and could also be a lot more certain about the data your tests need. |
While using named select and include bindings.ts still generate inline type instead of reference one which leads to less readable/ mockable types.
I suggest that when there is type name provided to select! or include! macro we should use it for generating specta reference type instead of inline type.
The text was updated successfully, but these errors were encountered: