chore(js-ts): Convert store migrations 000-027 to TypeScript#613
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
chore(js-ts): Convert store migrations 000-027 to TypeScript#613devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
…Script - Rename all 28 migration files (000.js through 027.js) to .ts - Add type annotations to all migrate() function signatures - Use Record<string, unknown> for state parameter type - Add type assertions for nested state.engine.backgroundState.* access - Define interfaces for structured data (Token, TransactionMeta, etc.) - Migrations 023-026 already used @metamask/utils type guards (isObject/hasProperty) - Rename 10 test files (019-028.test.js) to .test.ts - No logic changes - types only Co-Authored-By: Luke Page <luke.page@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.
Summary
Converts all 28 store migration files (000-027) from JavaScript to TypeScript, plus renames 10 associated test files from
.test.jsto.test.ts. This is part of the ongoing incremental JS→TS migration effort.Changes:
app/store/migrations/000.jsthrough027.js→.tsstate: Record<string, unknown>parameter types to allmigrate()functionsstate.engine.backgroundState.*property accessToken,TransactionMeta,NetworkConfiguration)@metamask/utilstype guards (isObject,hasProperty) — those patterns were preserved019-028.test.js→.test.ts)Files changed (53):
.js→.tswith type annotations.test.js→.test.ts(content unchanged)Review & Testing Checklist for Human
ascasts rather than runtime type guards)app/store/migrations/index.tsimports resolve correctly (extensionless imports should pick up.tsfiles)Notes
as) for nested state access since they predate the@metamask/utilstype guard pattern adopted in later migrationsisObject/hasPropertyguards which provide runtime type safetyreact-native-tcp404 infrastructure issue, not code changesLink to Devin session: https://app.devin.ai/sessions/51734166b8b740daa75579e47f5a94be
Requested by: @lukepage-COG
Devin Review