-
-
Notifications
You must be signed in to change notification settings - Fork 286
fix(client-nuxt): preserve null in WithRefs type for nullable fields #3131
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(client-nuxt): preserve null in WithRefs type for nullable fields #3131
Conversation
|
|
|
@renoschubert is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 3935034 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ead94fb to
5e83fc0
Compare
The WithRefs type was using NonNullable which stripped null from nullable field types. This made it impossible to pass null values to API endpoints that expect nullable fields (e.g., `street: null | string`). Added `| Extract<TData[K], null>` to both branches of WithRefs to preserve null in the union when the original type includes null. Fixes: nullable fields in request body cannot be set to null
5e83fc0 to
02f0305
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3131 +/- ##
==========================================
- Coverage 33.39% 32.83% -0.57%
==========================================
Files 429 430 +1
Lines 33654 34126 +472
Branches 2156 2157 +1
==========================================
- Hits 11238 11204 -34
- Misses 22388 22894 +506
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6b56032 to
a22a9f3
Compare
a22a9f3 to
59ef4d6
Compare
commit: |
closes #3129