-
-
Notifications
You must be signed in to change notification settings - Fork 6
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: account for mapped types without modifiers in isPropertyReadonlyInType #18
Conversation
Codecov Report
@@ Coverage Diff @@
## main #18 +/- ##
==========================================
+ Coverage 25.31% 33.89% +8.57%
==========================================
Files 13 13
Lines 237 239 +2
Branches 98 99 +1
==========================================
+ Hits 60 81 +21
+ Misses 174 140 -34
- Partials 3 18 +15
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
name, | ||
typeChecker | ||
|
||
const { modifiersType } = type as { modifiersType?: ts.Type }; |
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.
We might want to create a hasModifiersType
utility function.
Lets do this in another PR though.
@allcontributors add @JoshuaKGoldberg for bug |
I've put up a pull request to add @JoshuaKGoldberg! 🎉 |
PR Checklist
status: accepting prs
Overview
Checks if
type.modifiersType
exists before askingisPropertyReadonlyInType(modifiersType, ...)
.This is a recreation of ajafff/tsutils#136. Which means 😄:
Co-authored-by: @kirjs