Skip to content
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

Migrating the web part of the project to TypeScript? #497

Open
kichMan opened this issue Mar 5, 2025 · 3 comments
Open

Migrating the web part of the project to TypeScript? #497

kichMan opened this issue Mar 5, 2025 · 3 comments

Comments

@kichMan
Copy link
Contributor

kichMan commented Mar 5, 2025

What do you think about migrating the web part of the project to TypeScript? I am currently refactoring your project, including using TypeScript, as it helps me better understand the code. If you are interested, we could continue this work. In the future, to prevent users from having to convert the project from TS to JS, this operation could be automated using GitHub Actions.

@qu1ck
Copy link
Member

qu1ck commented Mar 6, 2025

I have considered it and its a good idea in general but I could not think of a way to do this gradually because the logic is currently split among files and has some cross dependencies that would make it tricky to satisfy the TS checker unless everything is moved to TS at once. And I couldn't justify the time it would take to migrate everything.

But my frontend experience is very limited so I'm open to suggestions here.

Some additional points to keep in mind with such migration:

  • Compatibility with custom scripts (user.js) should be maintained, i.e. functions and global variables should not be renamed by TS compiler/packer/any other tools that may be involved
  • Transpiled files should not be checked in, if a file is migrated it should be replaced by a .ts variant and it should be added to automatic build action that will integrate it into end user installable pcm package (zip archive).

@kichMan
Copy link
Contributor Author

kichMan commented Mar 7, 2025

@qu1ck Would you mind if I add you to my repository where I am migrating to TypeScript? There, you will be able to leave your comments and respond to my questions regarding the migration.

@qu1ck
Copy link
Member

qu1ck commented Mar 7, 2025

What do you mean by add? Is it not on github? You can just @ me in your fork issues/comments and I'll get a notification.
Happy to answer questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants