[GH-ISSUE #1483] [Maintenance] TypeScript migration #49670

Open
opened 2026-04-30 11:17:29 -05:00 by GiteaMirror · 14 comments
Owner

Originally created by @MatissJanis on GitHub (Aug 7, 2023).
Original GitHub issue: https://github.com/actualbudget/actual/issues/1483

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.


Remaining files:

Originally created by @MatissJanis on GitHub (Aug 7, 2023). Original GitHub issue: https://github.com/actualbudget/actual/issues/1483 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.** ---- Remaining files: - [x] packages/desktop-client/src/components/accounts/Account.jsx - https://github.com/actualbudget/actual/pull/3311 - [x] packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx - [x] packages/desktop-client/src/components/accounts/Balance.jsx - [x] packages/desktop-client/src/components/accounts/Header.jsx - https://github.com/actualbudget/actual/pull/3640 - [x] packages/desktop-client/src/components/accounts/Reconcile.jsx - https://github.com/actualbudget/actual/pull/3355 - [x] packages/desktop-client/src/components/budget/BudgetCategories.jsx - https://github.com/actualbudget/actual/pull/5961 - [x] packages/desktop-client/src/components/budget/BudgetTable.jsx - [x] packages/desktop-client/src/components/filters/FiltersMenu.jsx - https://github.com/actualbudget/actual/pull/6091 - [x] packages/desktop-client/src/components/manager/ManagementApp.jsx - [x] packages/desktop-client/src/components/mobile/accounts/Account.jsx - [x] packages/desktop-client/src/components/mobile/accounts/Accounts.jsx - [x] packages/desktop-client/src/components/mobile/accounts/AccountTransactions.jsx - [x] packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx - https://github.com/actualbudget/actual/pull/5997 - [x] packages/desktop-client/src/components/mobile/budget/CategoryTransactions.jsx - [x] packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx - https://github.com/actualbudget/actual/pull/5998 - [x] packages/desktop-client/src/components/mobile/transactions/TransactionList.jsx - https://github.com/actualbudget/actual/pull/4063 - [x] packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsx - [x] packages/desktop-client/src/components/modals/EditField.jsx - [x] packages/desktop-client/src/components/modals/EditRuleModal.jsx - [x] packages/desktop-client/src/components/modals/ImportTransactions.jsx - https://github.com/actualbudget/actual/pull/3570 - [x] packages/desktop-client/src/components/modals/ImportTransactions.test.js - https://github.com/actualbudget/actual/pull/3570 - [x] packages/desktop-client/src/components/modals/LoadBackup.jsx - https://github.com/actualbudget/actual/pull/3507 - [x] packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx - [x] packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx - https://github.com/actualbudget/actual/pull/5059 - [x] packages/desktop-client/src/components/payees/ManagePayees.jsx - https://github.com/actualbudget/actual/pull/3507 - [x] packages/desktop-client/src/components/payees/ManagePayeesPage.jsx - [x] packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx - [x] packages/desktop-client/src/components/reports/Header.jsx - [x] packages/desktop-client/src/components/reports/reports/NetWorth.jsx - https://github.com/actualbudget/actual/pull/3576 - [x] packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx - [x] packages/desktop-client/src/components/schedules/ScheduleDetails.jsx - [x] packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx - https://github.com/actualbudget/actual/pull/3396 - [x] packages/desktop-client/src/components/transactions/SelectedTransactionsButton.jsx - https://github.com/actualbudget/actual/pull/3640 - [x] packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx - [x] packages/desktop-client/src/components/transactions/TransactionList.jsx - [x] packages/desktop-client/src/components/transactions/TransactionsTable.jsx - [x] packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx - [x] packages/desktop-client/src/components/util/GenericInput.jsx - https://github.com/actualbudget/actual/pull/5976 - [x] packages/desktop-client/src/hooks/useSplitsExpanded.jsx - [ ] packages/component-library/src/icons/add-attribute.js - [x] packages/loot-core/src/platform/server/indexeddb/index.js
GiteaMirror added the maintenancehelp wantedgood first issue labels 2026-04-30 11:17:30 -05:00
Author
Owner

@doggan commented on GitHub (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/"

<!-- gh-comment-id:1707681232 --> @doggan commented on GitHub (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/"`
Author
Owner

@kymckay commented on GitHub (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.

<!-- gh-comment-id:1819465332 --> @kymckay commented on GitHub (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](https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components/). Will stick with the `function` style already in use.
Author
Owner

@joel-jeremy commented on GitHub (Apr 9, 2024):

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

<!-- gh-comment-id:2046113982 --> @joel-jeremy commented on GitHub (Apr 9, 2024): @MatissJanis I think we should pin this so that community is aware that the project is still accepting typescript PRs.
Author
Owner

@MatissJanis commented on GitHub (Apr 13, 2024):

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?

<!-- gh-comment-id:2053623754 --> @MatissJanis commented on GitHub (Apr 13, 2024): 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?
Author
Owner

@MatissJanis commented on GitHub (Jul 8, 2024):

The majority of the codebase has been migrated to TypeScript.

Pinning this issue to give it more visibility. If folks want to contribute - working on the TS migration is an easy way to learn more about the Actual codebase while also benefiting the community.

<!-- gh-comment-id:2214943083 --> @MatissJanis commented on GitHub (Jul 8, 2024): The majority of the codebase has been migrated to TypeScript. Pinning this issue to give it more visibility. If folks want to contribute - working on the TS migration is an easy way to learn more about the Actual codebase while also benefiting the community.
Author
Owner

@MatissJanis commented on GitHub (Aug 24, 2024):

Updated the root description with a list of files remaining. Not much to go to be 100% TS compliant!

<!-- gh-comment-id:2308365614 --> @MatissJanis commented on GitHub (Aug 24, 2024): Updated the root description with a list of files remaining. Not much to go to be 100% TS compliant!
Author
Owner

@cindywu commented on GitHub (Nov 21, 2024):

I'm going to try to chip away at this over the next few weeks.

<!-- gh-comment-id:2492570532 --> @cindywu commented on GitHub (Nov 21, 2024): I'm going to try to chip away at this over the next few weeks.
Author
Owner

@baruchiro commented on GitHub (Apr 1, 2025):

Hi, I want to add types to the npm package, but I'm unsure what the conventions are and where to put types (not "entities"). Can someone guide me?

Here is my first proposal:

https://github.com/actualbudget/actual/pull/4720

<!-- gh-comment-id:2768166549 --> @baruchiro commented on GitHub (Apr 1, 2025): Hi, I want to add types to the npm package, but I'm unsure what the conventions are and where to put types (not "entities"). Can someone guide me? Here is my first proposal: https://github.com/actualbudget/actual/pull/4720
Author
Owner

@ahmed-n-abdeltwab commented on GitHub (May 5, 2025):

Hey, I’d like to start working on this.

<!-- gh-comment-id:2849836167 --> @ahmed-n-abdeltwab commented on GitHub (May 5, 2025): Hey, I’d like to start working on this.
Author
Owner

@HenriqueOmena commented on GitHub (May 10, 2025):

I can see some Files are not been checked could you please update the checks for each files was done already ?

for example this one were done 4 months ago
https://github.com/actualbudget/actual/pull/4047

<!-- gh-comment-id:2868821718 --> @HenriqueOmena commented on GitHub (May 10, 2025): I can see some Files are not been checked could you please update the checks for each files was done already ? for example this one were done 4 months ago https://github.com/actualbudget/actual/pull/4047
Author
Owner

@ahmed-n-abdeltwab commented on GitHub (May 10, 2025):

I will look into it and see what I can do.

I can see some Files are not been checked could you please update the checks for each files was done already ?

You mean by that this PR #4047 is outdated and needs to be updated, is that correct?

<!-- gh-comment-id:2868844237 --> @ahmed-n-abdeltwab commented on GitHub (May 10, 2025): I will look into it and see what I can do. > I can see some Files are not been checked could you please update the checks for each files was done already ? You mean by that this PR #4047 is outdated and needs to be updated, is that correct?
Author
Owner

@jfdoming commented on GitHub (May 10, 2025):

I can see some Files are not been checked could you please update the checks for each files was done already ?

for example this one were done 4 months ago #4047

Updated the list. For future reference, you can get the most up-to-date list of files using: git ls-files "*.js"

<!-- gh-comment-id:2868873695 --> @jfdoming commented on GitHub (May 10, 2025): > I can see some Files are not been checked could you please update the checks for each files was done already ? > > for example this one were done 4 months ago [#4047](https://github.com/actualbudget/actual/pull/4047) Updated the list. For future reference, you can get the most up-to-date list of files using: `git ls-files "*.js"`
Author
Owner

@rboadu commented on GitHub (Mar 11, 2026):

I would like to work on the final file for issue. Can you please assign me this issue?

<!-- gh-comment-id:4040925035 --> @rboadu commented on GitHub (Mar 11, 2026): I would like to work on the final file for issue. Can you please assign me this issue?
Author
Owner

@jfdoming commented on GitHub (Mar 11, 2026):

I would like to work on the final file for issue. Can you please assign me this issue?

We don't assign issues, but feel free to submit a PR

<!-- gh-comment-id:4041156057 --> @jfdoming commented on GitHub (Mar 11, 2026): > I would like to work on the final file for issue. Can you please assign me this issue? > > We don't assign issues, but feel free to submit a PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#49670