Skip to content
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

Build: Enable TypeScript skipDefaultLibCheck #63056

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"emitDeclarationOnly": true,
"isolatedModules": true,

"skipDefaultLibCheck": true,
Copy link
Member

@tyxla tyxla Jul 2, 2024

Choose a reason for hiding this comment

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

TS doc recommends that we use skipLibCheck instead. Any good reason to prefer skipDefaultLibCheck?

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that, I'm not sure why they recommend that.

skipLibCheck ensures that the libraries we depend on typecheck. I understand that skipDefaultLibCheck only skips checking bundle libs (like DOM, ES2020, etc.). These libs are bundled with TypeScript and they should be the highest quality.

With other libs that come from other node_modules, it seems best to check their types especially because if we don't check these files, the errors can appear in other projects that have skipLibCheck disabled. We've seen that packages become stale or have conflicting types that we need to address, I dealt with a lot of this recently in #61486 and related PRs.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense to me. Seems like TS docs need some love!


/* Strict Type-Checking Options */
"strict": true,

Expand Down
Loading