Skip to content

chore: bump TypeScript target to ES2022 - #348

Merged
Mrtenz merged 1 commit into
mainfrom
mrtenz/es2022
Sep 24, 2026
Merged

Mrtenz merged 1 commit into
mainfrom
mrtenz/es2022

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

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 support ES2022, we can bump the shared target and lib settings to ES2022 to 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.toSorted is 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.json so TypeScript compiles against ES2022 instead of ES2020 for target, and sets lib to ES2022 (replacing ES2023). That aligns type-checking and assumed runtime APIs with what consuming browser and React Native clients actually support, while avoiding ES2023 features that Hermes still lacks.

Because tsconfig.build.json and tsconfig.test.json extend 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.

@Mrtenz
Mrtenz added this pull request to stack #347 September 24, 2026 12:04
@Mrtenz
Mrtenz marked this pull request as ready for review September 24, 2026 12:34
@Mrtenz
Mrtenz requested a review from a team as a code owner September 24, 2026 12:34
Base automatically changed from mrtenz/typescript-7 to main September 24, 2026 12:40
@Mrtenz
Mrtenz merged commit 1972b38 into main Sep 24, 2026
47 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/es2022 branch September 24, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants