Skip to content

Update tsconfig lib, module, and target options #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jun 6, 2025

This updates the lib, module, moduleResolution, and target options in tsconfig.

"lib": ["ES2020"],
"module": "CommonJS",
"moduleResolution": "node",
"lib": ["ES2023"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a ECMAScript version here that's newer than the target, in which case TypeScript will transpile newer features if necessary.

Comment on lines +7 to +8
"module": "Node16",
"moduleResolution": "Node16",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting these to Node16 is recommended by the TypeScript team, and also speeds up ts-bridge.

"noEmit": true,
"noErrorTruncation": true,
"noUncheckedIndexedAccess": true,
"strict": true,
"target": "es2020"
"target": "ES2022"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following MetaMask/metamask-extension#32529, our targeted browsers fully support ES2022.

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.

1 participant