-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Offer auto-import of hand-authored .d.ts files using .d.ts
extension
#53649
Comments
.d.ts
files with correct extension.d.ts
extension
Since this is about hand-authored
In particular (emphasis mine):
In other words, this pattern is already something of a footgun and I'm not convinced TS should actively encourage pulling the trigger by acknowledging the existence of the standalone |
Yeah, it's subtle but you should really not ever write a Thinking about this more... we're not ever going to automatically offer up imports which are actively bad ideas. |
Thanks for the explanation! Kind of a bummer, as I like the signal of intent that a |
Yeah, as discussed in the thread I linked above, |
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
as that's unnecessary and possibly harmful, see microsoft/TypeScript#53649 (comment)
I'm working on a TypeScript project with this relevant config:
package.json
tsconfig.json
I'd like VS Code to automatically import
.d.ts
files with their true extension, but they're currently being imported with the.js
extension.Auto import:
Desired import:
VS Code auto imports with the
.js
extension both when bringing up the help popover with ctrl+space, and when saving withaddMissingImports
enabled on save.I've tested this with the built-in TypeScript 5.0.2 on the March 2023 release of VS Code.
Here's a video demo:
vscode-import.mp4
The text was updated successfully, but these errors were encountered: