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

[docs] Include and explain value type change in migration guide #16226

Merged
merged 2 commits into from
Jun 16, 2019

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jun 14, 2019

Closes #16065

@eps1lon eps1lon added docs Improvements or additions to the documentation typescript labels Jun 14, 2019
@mui-pr-bot
Copy link

mui-pr-bot commented Jun 14, 2019

No bundle size changes comparing 564aed3...ad0bfc7

Generated by 🚫 dangerJS against ad0bfc7

docs/src/pages/guides/typescript/typescript.md Outdated Show resolved Hide resolved
docs/src/pages/guides/typescript/typescript.md Outdated Show resolved Hide resolved

However, that type cannot be verified at compile time in situations where it depends
on the components children e.g. for `Select` or `RadioGroup`. This means that
the soundest option is to type it as `unknown` and let the developer decide
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look but I don't think so. As long as the type only depends on the props of a single components is fine. It's only problematic if the type is passed to children/parents because typescript can't check those relationships.

@eps1lon eps1lon merged commit f184dc5 into mui:master Jun 16, 2019
@eps1lon eps1lon deleted the docs/select-value-type branch June 16, 2019 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Select] onChange parameter has unknown type in Select component
4 participants