-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support void as unknownType #1577
base: main
Are you sure you want to change the base?
Support void as unknownType #1577
Conversation
|
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-03-04 17:00:18 CET |
64d83d1
to
14168fa
Compare
Please let me know if there is anything missing in the code. |
e392503
to
e95563a
Compare
@vitorcamachoo Thanks for opening a pr, really appreciate your work here. And next to that, updating the docs to also include the new |
@all-contributors please add @vitorcamachoo for code |
I've put up a pull request to add @vitorcamachoo! 🎉 |
e95563a
to
97c3f41
Compare
Thank you, @stijnvanhulle, for your feedback. |
445f00f
to
8a4780e
Compare
8a4780e
to
87d47af
Compare
We work in an API, and in some cases, it returns an empty payload (404, 202, etc.), and for those cases, we want the void type. Currently, the Kubb configuration only allows
unknown
andany
.We are migrating from Orval to Kubb, and for those situations, Orval handles them as
void
which is the most correct in our use case.Example:
When using a union in Typescript, in which one of the types is unknown or any, the return type is unknown or any.