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] Fix unresolved returntypes for props #22459

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Sep 3, 2020

...and throw if it can't be resolved i.e. is undefined.

Only affected signature of filterOptions in https://next--material-ui.netlify.app/api/autocomplete/#props where we could identify the following fix:

-function(options: T[], state: object) => undefined
+function(options: T[], state: object) => T[]

The issue became more apparent thanks to #22055. So TypeScript can help find bugs in rare circumstances.

Stacked on top of #22447 which is not required but to prevent dealing with merge conflicts I based it off of existing work. View diff to #22447.

@eps1lon eps1lon added the docs Improvements or additions to the documentation label Sep 3, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 3, 2020

No bundle size changes comparing 2574143...2231138

Generated by 🚫 dangerJS against 2231138

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 4, 2020
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 4, 2020
@eps1lon eps1lon merged commit 33cf3d2 into mui:next Sep 4, 2020
@eps1lon eps1lon deleted the docs/stricter-types branch September 4, 2020 11:35
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants