MetaMask / MetaMask/core

Upgrade to TypeScript v5.4

Open
#4,373 0 comments 0 reactions 1 assignee View on GitHub

@MajorLift is already working on this.

Since Aug 2, 2024.

team-wallet-framework wf-typescript-upgrades
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

As part of the Wallet Framework Team's Q2 2024 OKRs (O3/KR4), we are upgrading all core packages to use TypeScript v5.4, with the goal of eventually upgrading to the latest version.

Prior to starting the upgrade process, we should read through the [v5.4 release announcements](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/) and make note of the following in this ticket:
- New language features that we should apply in our code (e.g. [`satisfies` operator in v4.9](https://github.com/MetaMask/core/issues/1972)).
- Breaking changes and possible regressions (e.g. [change in type narrowing behavior in v5.0](https://github.com/MetaMask/superstruct/issues/19)).
- For breaking changes, look at the [wiki](https://github.com/microsoft/TypeScript/wiki/API-Breaking-Changes).
- For regressions, also look at google search results: e.g. site:github.com typescript 5.1 regression
- Blockers for implementation (e.g. [fixing type declarations in dependencies to be ESM-compatible was a prerequisite for the v5.0 upgrade](https://github.com/MetaMask/core/issues/3651)).

We should also do a trial run of bumping TypeScript versions in core packages and seeing what (if any) error messages we get when we run `yarn build` and `yarn test`. These errors should be recorded in this ticket.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.