-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[typescript] Replace Array API with ReadonlyArray #40750
Comments
This could be a good improvement to ship in v6, will add it to the milestone |
hey everyone. can I pick this up? |
@DiegoAndai I wonder, I feel that major milestones should be focused on changes that require breaking changes (big features that require breaking changes or new major features to offset the removal of deprecated APIs) to decorelate things. The rest could go into iteration plans like TypeScript has microsoft/TypeScript#56948 (3 months) or VS Code has microsoft/vscode#201255 (1 month). This issue is small, we could add "good to take" and delegate to the community, optimizing for whenever a community member has time to donate (overall maximizing "time donation" for the community). It's also a Base UI issue. |
We migrated a good chunk in #40754 and #40972 which is great but I think the issue should be about updating all our public APIs to accept read only arrays, there are more e.g.
|
Steps to reproduce
A good number of API use
Array
while usingReadonlyArray
would be better DX, examples of such casesmaterial-ui/packages/mui-base/src/Unstable_Popup/Popup.types.ts
Line 60 in 48a2922
material-ui/packages/mui-base/src/useSlider/useSlider.ts
Line 145 in 48a2922
material-ui/packages/mui-base/src/useSlider/useSlider.types.ts
Line 102 in 48a2922
Current behavior
No response
Expected behavior
No response
Context
Compare:
vs.
We have solved this twice already:
#25155
#40481
We might as well solve it once for all.
Your environment
npx @mui/envinfo
Search keywords: ReadonlyArray
The text was updated successfully, but these errors were encountered: