Repository navigation
Skip implicit-any suggestions for content-mapped modules - #65631
zzy (zzy2008) wants to merge 1 commit into
Conversation
|
zzy (@zzy2008) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the change suppressing misleading TS7016 suggestions on content-mapped package imports.
No open issues 🎉
What changed in this PR
Fixes #65350 by preventing misleading TS7016 implicit-any suggestions for content-mapped package imports in the language service.
Changes:
- Skip the suggestion when module resolution used a content-mapper extension.
- Add a regression test confirming that a mapped package import retains the real TS2322 assignment error without TS7016.
| File | Description |
|---|---|
tsc/internal/project/contentmapper_test.go |
Tests diagnostics for a content-mapped package export in node_modules. |
tsc/internal/checker/checker.go |
Excludes content-mapped resolutions from the implicit-any suggestion. |
Review effort: Balanced
Fixes #65350.
A package can point its
exports.typesentry at a content-mapped file. The compiler loads the mapped TypeScript, but the checker still sees the original extension and emits TS7016 in the editor.Skip the implicit-any suggestion for resolutions that used a content-mapper extension. The language service regression test imports a mapped file from
node_modulesand checks that the real assignment error (TS2322) is the only diagnostic.Validation
npx hereby validate --allnpx hereby tidygit diff --exit-code