Skip to content
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] prop-types, propTypes: handle implicit children prop in react's generic types #3064

merged 1 commit into from Aug 30, 2021


Copy link

@vedadeepta vedadeepta commented Aug 30, 2021


All react generic type extends from type PropsWithChildren<P> = P & { children?: ReactNode | undefined };. So whenever a generic type from React is used I've added an optional children prop to this.declaredPropTypes.

Copy link

@codecov-commenter codecov-commenter commented Aug 30, 2021

Codecov Report

Merging #3064 (810806e) into master (cc95a82) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3064   +/-   ##
  Coverage   97.42%   97.43%           
  Files         111      111           
  Lines        7506     7522   +16     
  Branches     2758     2767    +9     
+ Hits         7313     7329   +16     
  Misses        193      193           
Impacted Files Coverage Δ
lib/util/propTypes.js 97.30% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc95a82...810806e. Read the comment docs.

ljharb approved these changes Aug 30, 2021
Copy link

@ljharb ljharb left a comment

Thanks, seems good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants