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

[Maintenance] TypeScript migration #1483

Open
MatissJanis opened this issue Aug 7, 2023 · 4 comments
Open

[Maintenance] TypeScript migration #1483

MatissJanis opened this issue Aug 7, 2023 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed maintenance Related to making the project easier to maintain

Comments

@MatissJanis
Copy link
Member

We are currently at around 50% TypeScript. There is still lots of work to be done to get to 100%.

Feel free to help out by converting a file here and there. Also hardening the existing TS files is welcome (i.e. converting unknown and any to more strict types).

Please do not send massive migration PRs. Try to keep it small and isolated.

@doggan
Copy link
Contributor

doggan commented Sep 6, 2023

While looking at this, I found a cool package (https://github.com/codemix/deprank) that uses PageRank algorithm to find the 'most important' files in the project and list out dependencies. This can give a good idea of which files are good to tackle first for JS -> TS conversion (and which files may be more challenging).

Here's the command I ran for desktop-client:
npx deprank --ext=".js,.jsx" --deps-first ./packages/desktop-client/src | grep -v "/icons/"

@kymckay
Copy link
Contributor

kymckay commented Nov 20, 2023

One thought I had on this (may have been discussed previously). For truly strict typing, the function components themselves should be typed as FunctionComponent. Is there any objection to doing so? The only reason I can think would be stylistic preference.

Edit: Decided to look into this and seems latest consensus is that it's not needed. Will stick with the function style already in use.

@joel-jeremy
Copy link
Contributor

@MatissJanis I think we should pin this so that community is aware that the project is still accepting typescript PRs.

@MatissJanis
Copy link
Member Author

That makes sense @joel-jeremy , but we can only pin 3x issues. Perhaps lets wait for one of the experimental features to be released and then pin this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed maintenance Related to making the project easier to maintain
Projects
None yet
Development

No branches or pull requests

4 participants