-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix missing TS warnings in pipe method #785
Conversation
Co-authored-by: Elton Lobo <EltonLobo07@users.noreply.github.com>
fcdeb42
to
168789d
Compare
library/src/types/metadata.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might not need to change this file. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same answer applies here, but feel free to give me feedback.
Yes, I prefer to avoid using |
I thought about it, and I think I prefer consistency over strictness in this case, but I will think about it again before merging. Do you have any other feedback? If we're both happy and can't find any major drawbacks, we should keep in mind to update the docs before merging. |
I have no additional feedback. The only drawback is that we may lose some type safety, which was already mentioned here. Since we started working with |
I think in both cases it doesn't matter. For We could basically follow 3 paths. Maximum consistency (and therefore more Another thing we could consider changing is to remove the generics from |
Okay. This is a bad idea. Some people write code like this: import * as v from 'valibot';
type MyType = { key: string };
const Schema = v.object({ key: v.string() }) satisfies v.GenericSchema<MyType>; And chancing |
I will wait for your feedback on my comment yesterday and then make a decision and release a new version. Feel free to update the docs after it is clear how we will proceed. |
After your explanation and thinking about it, I agree. It makes sense. I now think following any of the two paths (the current solution or no unnecessary However, there is one case where I would prefer no unnecessary
Changing the |
Co-authored-by: Elton Lobo <EltonLobo07@users.noreply.github.com>
Thanks for your feedback and cooperation! I think we are good now and I will move on with the docs to be able to merge this PR because I want to release a new version probably today. But feel free to give me feedback if you see something. |
v0.38.0 is available 🚀 |
Fix #669