-
Notifications
You must be signed in to change notification settings - Fork 23
Add better type for flags with default value #53
Conversation
Thanks for the contribution! Before we can merge this, we need @frangio to sign the Salesforce.com Contributor License Agreement. |
b009898
to
9189c22
Compare
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
========================================
- Coverage 91.35% 0% -91.36%
========================================
Files 11 1 -10
Lines 324 29 -295
Branches 85 14 -71
========================================
- Hits 296 0 -296
- Misses 12 29 +17
+ Partials 16 0 -16
Continue to review full report at Codecov.
|
420b523
to
41c6aec
Compare
Not sure why the CI is not running. A previous run had passed. |
@RasPhilCo any chance to get this small PR merged? 🙏 Thanks! |
Nice! |
The CI failure seems unrelated to this PR. |
Can you push another commit with a comment or something small to trigger CI again? I had to re-add the repo and I think there's a caching issue. |
I fixed what was causing the tests to fail. This coverage report is very odd-looking though. 🤔 -91.36%? |
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.
🏄
A flag with a default value was being typed as as
T | undefined
. For example the following would not type:I added a special case in the type for this, the same way that
required: true
works.Making the flag required is a workaround to get the above to type, but this is undesirable because it incorrectly shows the flag as required in the help.