Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(type-utils): intersection types involving readonly arrays are now handled in most cases#4429
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nx-cloudbot commentedJan 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the PR,@RebeccaStevens! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
netlifybot commentedJan 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✔️ Deploy Preview fortypescript-eslint ready! 🔨 Explore the source changes:bd475fb 🔍 Inspect the deploy log:https://app.netlify.com/sites/typescript-eslint/deploys/61e550ad525f4a000704eb25 😎 Browse the preview:https://deploy-preview-4429--typescript-eslint.netlify.app |
… handled in most casesfixtypescript-eslint#4428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks so much for handling this!
I merged your test PR first - just needs the conflict resolved and we can merge this!
codecovbot commentedJan 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #4429 +/- ##==========================================- Coverage 94.54% 92.73% -1.82%========================================== Files 147 161 +14 Lines 7851 8160 +309 Branches 2516 2621 +105 ==========================================+ Hits 7423 7567 +144- Misses 234 392 +158- Partials 194 201 +7
Flags with carried forward coverage won't be shown.Click here to find out more.
|
ugh. git is the worst. |
… handled in most cases (typescript-eslint#4429)
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
isTypeReadonly
now handles intersection involving readonly arrays and tuples properly in most cases.The cases that aren't handled are those of that intersect a readonly array with an object that shares mutable properties with the array. For example:
Handling this in the general case may not be possible as we can't treat readonly arrays in nested intersections properly (at least not without a lot of work).
As a workaround, users can just wrap their intersection in
Readonly
if they come across this case.Note: This PR builds off#4416