feat: support exactOptionalPropertyTypes#3157
feat: support exactOptionalPropertyTypes#3157izaakschroeder wants to merge 1 commit intohey-api:mainfrom
exactOptionalPropertyTypes#3157Conversation
|
|
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: f06d1fc 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 |
|
@izaakschroeder is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3157 +/- ##
==========================================
- Coverage 32.83% 32.82% -0.01%
==========================================
Files 430 430
Lines 34126 34134 +8
Branches 2157 2157
==========================================
Hits 11204 11204
- Misses 22894 22902 +8
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:
|
4bed041 to
15d0324
Compare
commit: |
0d4e035 to
938a565
Compare
938a565 to
f06d1fc
Compare
|
I don't think this would help us long-term because it doesn't prevent from writing more non-compliant code. I'm not sure what the ideal fix here is, is skipping the rule for the offending files not an option? |
NOTE: There are not many significant updates here – the bulk of the diff is regenerating snapshots and examples. The core changes are added a little code to generate
| undefinedon the built types and adding| undefinedto the existing runtime template types. As far as I can tell there is no usage of e.g.'foo' in obj ? obj.foo : ...but insteadobj.foo ?? ..., the latter of which is totally fine with these changes.TODO:
Previously types generated look like
{ foo?: string }, now they look like{ foo?: string | undefined }.Before:
Refs: #2236