chore: add explicit "types" to tsconfig files#6758
Open
trentm wants to merge 1 commit into
Open
Conversation
We use typescript v5 for compilation. However, sometimes external tooling like an IDE will, by default, use the latest TS version for editor support (like "squigglies" for lint/problems). This is the case for VS Code and TS v6. TS v6 changed the "types" tsconfig setting to default to `[]`. https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#types-now-defaults-to-[] It previously defaulted to "enumerate everything in node_modules/@types". As (mild) preparation for eventually migrating to TS v6 and to be nice to developers whose IDE or other tool defaults to using TS v6, let's explicitly list our "types". I don't believe there is a downside to this, other than needing to add "types" entries as usage changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6758 +/- ##
==========================================
+ Coverage 94.78% 94.95% +0.17%
==========================================
Files 374 377 +3
Lines 12439 12743 +304
Branches 2841 2896 +55
==========================================
+ Hits 11790 12100 +310
+ Misses 649 643 -6 🚀 New features to boost your workflow:
|
Contributor
Author
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.

We use typescript v5 for compilation. However, sometimes external
tooling like an IDE will, by default, use the latest TS version for
editor support (like "squigglies" for lint/problems). This is the
case for VS Code and TS v6.
TS v6 changed the "types" tsconfig setting to default to
[].https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#types-now-defaults-to-[]
It previously defaulted to "enumerate everything in node_modules/@types".
As (mild) preparation for eventually migrating to TS v6 and
to be nice to developers whose IDE or other tool defaults to using TS
v6, let's explicitly list our "types".
I don't believe there is a downside to this, other than needing
to add "types" entries as usage changes.