Skip to content
This repository was archived by the owner on Nov 9, 2026. It is now read-only.

Enable strict TypeScript checking - #429

Closed
itzKLAUS wants to merge 1 commit into
MetaMask:mainfrom
itzKLAUS:chore/strict-typescript
Closed

itzKLAUS wants to merge 1 commit into
MetaMask:mainfrom
itzKLAUS:chore/strict-typescript

Conversation

@itzKLAUS

@itzKLAUS itzKLAUS commented Oct 2, 2026

Copy link
Copy Markdown

Enable full TypeScript strict checking in place of strictNullChecks, as requested in #352.

Closes #352

Add explicit types for the nullish helper, encoded array pairs and dynamically indexed test examples. Copy sanitized message properties through a generic key so their value types remain correlated. Narrow the caught decryption error's optional message while preserving the existing error-message checks. No strict options are disabled, and no new any annotations or suppression comments are added.

Validation on Windows / Node 24.19.0 with the pinned Yarn 4.16.0 and TypeScript 4.8.4:

  • yarn install --immutable, yarn build and yarn lint passed.
  • The source suite passed: 1,391 tests and 712 unchanged snapshots across six suites, with the repository coverage thresholds met.
  • yarn test --runInBand also passed after the build (it runs both source tests and emitted tests under dist, so its 2,782-test count includes duplicates).
  • Enabling strict checking alone initially produced compiler errors; the final patch compiles with strict: true.

Local checkout line endings were normalized to LF for lint, and a local yarn command shim delegated to Corepack. Neither is included in the diff. The existing dependency peer warnings remain; dependencies and the lockfile were not changed. Node 22/26 and hosted CI were not run locally.

The broader module-template PR #351 still retains strictNullChecks; this change addresses the strict setting independently.

@FrederikBolding

Copy link
Copy Markdown
Member

Closing in favor of moving to core repo. Thanks for the contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsconfig: Disable strictNullChecks, enable strict

2 participants