-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
style(Feed): update typings and propTypes usage #1285
Conversation
Codecov Report@@ Coverage Diff @@
## master #1285 +/- ##
==========================================
+ Coverage 95.91% 95.92% +<.01%
==========================================
Files 883 883
Lines 4926 4928 +2
==========================================
+ Hits 4725 4727 +2
Misses 201 201
Continue to review full report at Codecov.
|
|
||
/** An event can contain additional information like a set of images. */ | ||
images?: any; | ||
images?: boolean | Array<any>; |
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.
Should this be array of React.ReactNode?
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 set React.ReactNode
when we deal with contentShorthand
, but in this case we have:
PropTypes.oneOfType([
PropTypes.bool,
customPropTypes.collectionShorthand,
]),
Which represents array of itemShorthand
, we mark it as any
for now.
I want to add new TS types for customPropTypes
in future.
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.
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.
Just one comment regarding the image shorthand array type.
Looks great, we'll follow up on types for customPropTypes in #1289 . |
Released in |
This PR is part of work for removing propTypes in production bundle (#524, #731).
Also, cleanups and updates typings for #1072.