| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| ariaDescribedBy = `pf-about-modal-content-${this.id}`; | ||
|
|
||
| static defaultProps = { | ||
| static defaultProps: PickOptional<AboutModalProps> = { |
There was a problem hiding this comment.
Why can't we do static defaultProps = { ... } as AboutModalProps?
Sorry, something went wrong.
There was a problem hiding this comment.
You probably can, but if one of the types was wrong, for example if you defaulted isOpen to a string isOpen: 'false' the TS error/warning would not be as clear
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3536.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3536 +/- ##
=========================================
Coverage ? 67.09%
=========================================
Files ? 903
Lines ? 25478
Branches ? 2259
=========================================
Hits ? 17095
Misses ? 7341
Partials ? 1042
Continue to review full report at Codecov.
|
Sorry, something went wrong.
| isDisabled: false, | ||
| isValid: true, | ||
| onChange: Function.prototype | ||
| onChange: () => {} |
There was a problem hiding this comment.
Must callback functions return an object or do we really want () => void?
There are a bunch of these throughout the PR.
Sorry, something went wrong.
There was a problem hiding this comment.
This is not the type definition but just a default value which is a stand in for any function, e.g.
(something) => {
// function body
}
The actual type is onChange?: (checked: boolean, event: React.FormEvent<HTMLInputElement>) => void;
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, missed that
Sorry, something went wrong.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What: Closes #3535