Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vitorcamachoo
Copy link

@vitorcamachoo vitorcamachoo commented Feb 25, 2025

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 and any.
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.

Copy link

changeset-bot bot commented Feb 25, 2025

⚠️ No Changeset found

Latest commit: e95563a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kubb-labs
Copy link

kubb-labs bot commented Feb 25, 2025

The preview deployment is in progress. 🟡

Open Build Logs

Last updated at: 2025-02-26 15:25:19 CET

@vitorcamachoo vitorcamachoo force-pushed the support-void-unknown-type branch 2 times, most recently from 64d83d1 to 14168fa Compare February 25, 2025 18:08
@vitorcamachoo
Copy link
Author

Please let me know if there is anything missing in the code.

@vitorcamachoo vitorcamachoo force-pushed the support-void-unknown-type branch from 14168fa to e392503 Compare February 25, 2025 18:20
@vitorcamachoo vitorcamachoo force-pushed the support-void-unknown-type branch from e392503 to e95563a Compare February 26, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant