-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[docs] Add Typescript demos for MenuPopupState #17869
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
Conversation
No bundle size changes comparing 6b9ecbe...3907aea |
Thanks for working on this.
|
@eps1lon Thanks for the detailed instruction. However I tried to follow it and there is stil an issue. What I'm doing wrong? |
You need to add actual types declare module 'material-ui-popup-state' {
// export vars, functions, types go here
} https://medium.com/@chris_72272/migrating-to-typescript-write-a-declaration-file-for-a-third-party-npm-module-b1f75808ed2 looks like a good guide (skip to "Create the declaration file") |
Assuming the long term plan is to remove the need for this package (with simpler bindings in the core), would it make sense to ignore the migration of this demo to TypeScript? It's an open question, I think that it depends on how easy the migration of the demo is, how long we will keep it, and how many people use it. |
We had the following mention in #14897 a week ago:
|
How guys do you want to move forward with this problem? |
Ok, let's optimize for the long term. I think that the optimal outcome would be to solve the problem https://github.com/jcoreio/material-ui-popup-state solves in the core directly. I'm closing the pull request, @programistka thank you so much for investing time in it! Hopefully, it was a worthy experience. In the meantime, if jcoreio/material-ui-popup-state#12 get resolved, I think that can accept a pull request with a TypeScript version of the demos. |
Hi folks, I've finally gotten enough experience with TS to be comfortable adding TS types to |
Nice :) |
I wasn't able to run successfully yarn docs:typescript:check as it was told that it can be pushed anyway. Please let me know if I did it right or wrong.
Related to #14897