-
-
Notifications
You must be signed in to change notification settings - Fork 295
feat: support exactOptionalPropertyTypes
#3157
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
base: main
Are you sure you want to change the base?
feat: support exactOptionalPropertyTypes
#3157
Conversation
|
|
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