Discussion about Typescript, vue3, composition api, pinia... #165
SimonSimCity
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to contribute to this project by starting to transliterate the major part of the project to Typescript. Since I'm unfamilar with the codebase and don't know intuitively what properties are available on which object, I see a great value in using TypeScript which allows the usage of code completion for e.g. properties of objects.
I've successfully deployed projects to typescript and would start with the main files, slowly making my way through to the components and all other files. I'd do this in multiple steps, each as a separate pull-request not to conflict with other people working on the project.
For Typescript I'd go for a very strict model, which treats null as a separate type and enforces type checking. This way a type-safe usage of properties can be ensured, even for people not familiar with the project.
This project also uses vue in version 2, which I'd upgrade to 3 in order to have the components transition over to the composition api. The benefit of using composition api is that type safe checks can be used in the html-templates.
In the long run I'd replace vuex by pinia, which is the current recommendation by the developers (https://pinia.vuejs.org/introduction.html#comparison-with-vuex).
These all are based on experience I've had in other projects. If you see something here as not worth the hassle or want to discuss its feasibility for this project, I'm open for everything. Just thought I could help out in making this project more maintainable :)
Beta Was this translation helpful? Give feedback.
All reactions