MetaMask / MetaMask/metamask-extension
[Typescript Conversion: Level 1]: Convert app/scripts/background.js to typescript
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
## **Description**
Convert `app/scripts/background.js` from JavaScript to TypeScript as part of the TS migration initiative.
## **Scenario (for user stories only)**
_(Not applicable)_
## **Design (for user stories only)**
_(Not applicable)_
## **Technical Details (for technical tasks only)**
- Convert this file to TypeScript.
- Migration Level: **1**
- Dependencies:
- app/scripts/first-time-state.js
- app/scripts/lib/createStreamSink.js
- app/scripts/lib/ens-ipfs/setup.js
- app/scripts/lib/get-first-preferred-lang-code.js
- app/scripts/lib/getObjStructure.js
- app/scripts/lib/migrator/index.js
- app/scripts/lib/notification-manager.js
- app/scripts/lib/util.ts
- app/scripts/metamask-controller.js
- app/scripts/migrations/index.js
- app/scripts/platforms/extension.js
- shared/constants/app.ts
- shared/constants/metametrics.ts
- shared/modules/mv3.utils.js
- shared/modules/object.utils.js
- Dependents:
- None
## **[Threat Modeling Framework](https://github.com/adamshostack/4QuestionFrame) (for technical tasks only)**
- What are we working on? Convert file to TypeScript.
- What can go wrong? Type errors, integration mismatches, missing types.
- What are we going to do about it? Write types carefully and test thoroughly.
- Did we do a good job? _(To be evaluated)_
## **Acceptance Criteria**
- File is fully converted to TypeScript.
- Tests pass.
- File adheres to linting rules.
- Functionality remains unchanged.
## **Stakeholder Review (for MetaMask employees only)**
- [X] Engineering
- [ ] Design
- [ ] Product
- [ ] QA
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management
- [ ] Other
## **References**
- Parent issue: #31460
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/scripts/background.js and read the listed dependencies to understand its interfaces before converting it. Run the relevant tests and lint checks; done means the file is fully converted to TypeScript, behavior is unchanged, and tests and linting pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100