MetaMask / MetaMask/metamask-extension
[Typescript Conversion: Level 18]: Convert ui/ducks/alerts/enums.js to typescript
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
## **Description**
Convert `ui/ducks/alerts/enums.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: **18**
- Dependencies:
- None
- Dependents:
- ui/ducks/alerts/index.js
- ui/ducks/alerts/invalid-custom-network.js
- ui/ducks/alerts/unconnected-account.js
## **[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
Research direction
Start by inspecting ui/ducks/alerts/enums.js and the TypeScript configuration and migration conventions used nearby. Check its dependents—ui/ducks/alerts/index.js, ui/ducks/alerts/invalid-custom-network.js, and ui/ducks/alerts/unconnected-account.js—to preserve their interfaces. Done means the file is converted, functionality is unchanged, and the relevant tests and lint checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100