MetaMask / MetaMask/metamask-extension

[`MetamaskController` A.8] Remove `as never` cast from `register.ts`

Open Beginner friendly
#41,746 0 comments 0 reactions 0 assignees View on GitHub
for-migration INVALID-ISSUE-TEMPLATE mig-epic-65-child team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Sub-epic:** [#41736 — `MetamaskController` decomposition: wallet-services completion](https://github.com/MetaMask/metamask-extension/issues/41736)
**File:** `app/scripts/lib/wallet-services/register.ts` (created by A.1–A.6, retyped in A.7)
**Size:** S

## Problem

After A.7 composes `WalletServicesActions` and retypes `registerWalletServices`, the `as never` cast in `register.ts` (introduced during A.1–A.6 to shim the type mismatch between `RootMessenger`'s default generic and each module's structural messenger type) becomes unnecessary.

## Solution

Remove the cast and confirm `tsc` passes.

## Acceptance criteria

- [ ] No `as never` (or any other cast) in `register.ts`
- [ ] `tsc` passes

## Dependencies

**A.7** — union must be composed first.

Contributor guide

Open the contributing guide

Research direction

Open app/scripts/lib/wallet-services/register.ts and review the registerWalletServices typing after dependency A.7's WalletServicesActions union was composed. Remove the remaining cast without adding another cast, then run tsc. Done means register.ts contains no casts and TypeScript compilation passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.