MetaMask / MetaMask/core

Enable `exactOptionalPropertyTypes`

Open
#6,565 0 comments 0 reactions 0 assignees View on GitHub
enhancement team-core-platform
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

We should enable `exactOptionalPropertyTypes` to improve type safety. This would especially simplify how we handle optional controller state properties, because controller state must extend `Json` but `undefined` isn't allowed in `Json`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the TypeScript configuration that controls compiler options and inspect the controller state types that must extend Json. Enable exactOptionalPropertyTypes, then run the repository's type checks to identify affected optional properties; done means the monorepo type-checks successfully with the option enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.