-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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-infra] Improve type naming on the API pages #41073
Comments
Hello, |
@EyaOuenniche sure, yeah! Feel free to kickstart it and ask for a review :) |
Great! Thank you. |
@EyaOuenniche hey there! The Fade page linked in the issue is just one illustrative example — the correct approach would be to change in a place where the entire documentation platform is affected (not just the Fade API page). I've looked into it myself and couldn't precisely figure out where to go to change that, so I'll summon @mui/docs-infra for further help :) |
hello! |
I can see two places. The first one generate the type of the props.
|
We're using a shorthand notation to mention to type names that seem to be about React's prop-types, like
bool
.https://mui.com/material-ui/api/fade/#fade-prop-appear
But it seems to make more sense to use the full name for it to be more accurate with how TypeScript refers to them — e.g.,
boolean
.This naming design optimizes for a time when most developers would write "propType". Today, these developers are a lot more likely to write TypeScript types, so it will bring a more intuitive DX to make the change:
Search keywords: type naming, api page
The text was updated successfully, but these errors were encountered: