-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[TextareaAutosize][base] Convert code to TypeScript #34721
Comments
@michaldudak I think I can take this task. Could you assign to me, please? |
Sure, go ahead! |
I need help with with some piece of code inside the The component contains React.useRef(null); Is it a good practice that I use non-null assertion on the variable assignment like this? const inputShallow = shadowRef.current;
// here I put the non-null assertion to resolve TS typecheck
inputShallow!.style.width = computedStyle.width; It will resolve the TypeScript typecheck error warning, but I don't know if ref can be null. Thank you for your help. |
Yes, you could do it. This ref is I see @paco9595 has also started working on this in #34751. Could you please coordinate your efforts? As @ryanrw was assigned to this issue, I'd prefer his implementation to be merged, but we can have @paco9595's PR as a fallback. |
@michaldudak It's ok to merge #34751 work first, since I'm tried to type safe if I'm possible to do so. (It's also holiday here, sorry for late work 😅) |
@michaldudak I just review on #34751 and I think his work is as same as mine, so it's ok to using his work instead. |
@michaldudak created PR which closes this issue #35862 |
Convert the TextareaAutosize and related modules (everything inside mui-base/src/TextareaAutosize) to TypeScript, to increase consistency with other MUI Base components.
There should be no functional changes.
Use other components as a reference.
The text was updated successfully, but these errors were encountered: