Update typescript configs for better in-editor support #12888
Merged
+51
−97
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.
Summary
This enhances in-editor typescript support by
shell/types/vue-shim.d.ts
is included in the typescript configshell/types/vue-shim.d.ts
Fixes #12893
Technical notes summary
I tested this change in Zed, Webstorm, and VS Code - typescript support appears to be improved across the board with regards to properly detecting aliased imports and detecting Vue augments.
VS Code allows for selecting the typescript version; developers can choose to use VS Code's version or the workspace version. Later versions of Typescript appear to better handle multiple tsconfigs, so updating typescript to 5.6.3 resolves the import issue nicely. This is also the default version that is currently used in VS Code as of writing.
Areas or cases that should be tested
In-editor typescript support. We want to ensure that aliased imports of components work across the board. We also want to ensure that
this.$t()
andthis.$store()
are properly detected in component scripts.Areas which could experience regressions
This should enhance in-editor typescript support, but keep an eye out for new invalid typescript warnings that might not have been present before.
Screenshot/Video
Component imports no longer display errors
Store getters no longer display errors
Checklist