Repository navigation
chore: bump TypeScript target to ES2022 - #348
Merged
Merged
Conversation
Mrtenz
added this pull request to stack #347
September 24, 2026 12:04
Mrtenz
force-pushed
the
mrtenz/es2022
branch
from
September 24, 2026 12:21
5f5b4e5 to
1865392
Compare
Mrtenz
force-pushed
the
mrtenz/es2022
branch
from
September 24, 2026 12:32
1865392 to
16eb5d6
Compare
Mrtenz
marked this pull request as ready for review
September 24, 2026 12:34
Mrtenz
force-pushed
the
mrtenz/es2022
branch
from
September 24, 2026 12:36
16eb5d6 to
9ca579c
Compare
cryptodev-2s
approved these changes
Sep 24, 2026
Mrtenz
force-pushed
the
mrtenz/es2022
branch
from
September 24, 2026 12:40
9ca579c to
7cbf899
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The base TypeScript configuration targeted
ES2020, which is older than what the browser targets and React Native version used by the clients that consume these packages actually support. Since those clients supportES2022, we can bump the sharedtargetandlibsettings toES2022to take advantage of newer syntax and APIs.We stop short of
ES2023, since Hermes (the React Native JS engine) doesn't fully support it yet (most notably,Array.prototype.toSortedis unsupported).Examples
MetaMask/core#10019
Note
Low Risk
Compiler-options-only change with no runtime logic; main effect is stricter or different typing around newer/older built-in APIs.
Overview
Updates the shared
tsconfig.jsonso TypeScript compiles againstES2022instead ofES2020fortarget, and setslibtoES2022(replacingES2023). That aligns type-checking and assumed runtime APIs with what consuming browser and React Native clients actually support, while avoidingES2023features that Hermes still lacks.Because
tsconfig.build.jsonandtsconfig.test.jsonextend this file, the new baseline applies across build and test as well.Reviewed by Cursor Bugbot for commit 7cbf899. Bugbot is set up for automated code reviews on this repo. Configure here.