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

Mark props with default values as optional #438

Closed
wants to merge 1 commit into from

Conversation

intrnl
Copy link

@intrnl intrnl commented Jan 26, 2023

This pull requests marks props that has default values as optional

@ValentinH
Copy link
Owner

I need to try it locally (Circle CI was disconnected since their hack). Indeed, this used to cause issues with the defaultProps definition and usage in the component implementation.

Did you try running type checking on this?

@ValentinH
Copy link
Owner

I checked and it is what I fear: if you mark them as optional then they are seen as optional in the implementation despite of the default props:
image

What issue are you facing because these props are not required when using the component:
image
(there is no error above)

@intrnl
Copy link
Author

intrnl commented Jan 27, 2023

mmm yeah that's unfortunate, I hadn't actually checked the typings properly because I didn't have the time to set the project up locally. I think I'll close this for now.

@intrnl intrnl closed this Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants