Skip to content

Discussion about Typescript, vue3, composition api, pinia... #164

@SimonSimCity

Description

@SimonSimCity

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions