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 typings for Modal/Confirm to match their proptypes #1616

Closed
wants to merge 1 commit into from

Conversation

seryl
Copy link

@seryl seryl commented Apr 24, 2017

Package: semantic-ui-react
Version: 0.68.1

I was seeing the following two errors when packaging with webpack:

../semantic-ui-react/dist/commonjs/addons/Confirm/Confirm.d.ts
(4,18): error TS2430: Interface 'ConfirmProps' incorrectly extends interface 'ModalProps'.
  Property 'content' is optional in type 'ConfirmProps' but required in type 'ModalProps'.

and

../semantic-ui-react/dist/commonjs/addons/Confirm/Confirm.d.ts
(4,18): error TS2430: Interface 'ConfirmProps' incorrectly extends interface 'ModalProps'.
  Property 'header' is optional in type 'ConfirmProps' but required in type 'ModalProps'.

As far as I can tell the proptypes for content and headers aren't required for modal so I've removed that restriction so that the extends will match

Note: No linter errors added and passes tests.

@codecov-io
Copy link

codecov-io commented Apr 24, 2017

Codecov Report

Merging #1616 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1616   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files         141      141           
  Lines        2398     2398           
=======================================
  Hits         2392     2392           
  Misses          6        6

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 54e490e...14cf227. Read the comment docs.

@layershifter
Copy link
Member

Thanks for PR. However, there is #1611, it fixes this and many other issues.

@seryl seryl deleted the fix-modal-typings branch April 24, 2017 13:22
@levithomason
Copy link
Member

Released in [email protected].

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

Successfully merging this pull request may close these issues.

4 participants