-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Improve definitions on all components #2734
Comments
How are the typescript definitions generated? By hand? |
Yes currently by hand when we make changes in the components we update the TS definition. |
Does this mean version 9 will be based on TypeScript? Sounds cool !!! |
I am not sure is going to be written in TypeScript just that the definitions get an overhaul and documented similar to how PrimeVue is doing it. |
Honestly, most of the issues that I experience with primereact are related to the type definitions being missing or incorrect. This happens most often with events. I often need to place a breakpoint in an event just to see what arguments are passed in. IMHO, the lasting fix for this would be to have a typescript-first approach. Change the extensions of all the Then future improvements will have a much reduced chance of regression in missing/incorrect type definitions. |
Additional improvements could be made by making |
@gordolio its easier said than done if you look at this attempt at a PR which worked but we had to roll it back because it was too burdensome: https://github.com/primefaces/primereact/pull/3199/files |
Ref; https://github.com/primefaces/primevue/blob/master/src/components/accordion/Accordion.d.ts
Notes:
ref
#2721A general study can be made on this subject and help users read the codes better.
The text was updated successfully, but these errors were encountered: