chore(js-ts): migrate 11 Redux action creator files from JS to TS#324
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
chore(js-ts): migrate 11 Redux action creator files from JS to TS#324devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore(js-ts): migrate 11 Redux action creator files to TypeScript
Summary
Converts all 11 Redux action creator files under
app/actions/from JavaScript to TypeScript as part of the ongoing JS-to-TS migration:alert,bookmarks,browser,collectibles,infuraAvailability,modals,notification,privacy,settings,transaction,wizardEach file gets:
BrowserAction,TransactionAction)No runtime logic was changed.
yarn lint(0 errors) andyarn lint:tscpass cleanly.Review & Testing Checklist for Human
transaction/index.ts:newAssetTransactionandsetSelectedAssetacceptSelectedAsset | objectand immediately cast viaas SelectedAsset. This works aroundgetEther()(a JS file) being typed as returningobjectvia its JSDoc. Confirm this tradeoff is acceptable vs. fixinggetEther's return type upstream.Bookmarkinterface (bookmarks/index.ts):urlandnameare optional with a[key: string]: unknownindex signature. This was necessary because callers passAutocompleteSearchResult(nourlonTokenSearchResult) and{ url: any }(noname). Verify this doesn't mask real bugs at call sites likeRPCMethodMiddleware.ts:905andUrlAutocomplete/Result.tsx:38.securityAlertResponse: objectintransaction/index.ts: Typed as bareobjectbecause the importedSecurityAlertResponseinterface from BlockaidBanner lacks an index signature. This is very permissive.step: number | boolean(wizard),autodismiss: number | boolean(notification),timestamp: number | string(privacy),marketingEnabled: boolean | null(browser),basicFunctionalityEnabled: boolean | null(settings). These were widened to match existing callers — confirm the widened types reflect intentional usage, not latent bugs.TokenSortConfigshape insettings/index.ts— thekey,order,sortCallbackfields were inferred; confirm they match the actual reducer expectations.Suggested test plan: Run the full app locally and exercise flows that dispatch these actions — send a transaction, toggle settings, manage bookmarks/NFTs, open browser tabs — to verify no runtime regressions from the file renames.
Notes
AlertAction,TransactionAction, etc.) are not yet consumed by reducers — they're scaffolding for future reducer typing.