microsoft / microsoft/TypeScript
AllowUnresolveNames not working for completion getters/setters and property signature and declaration
Open
Nobody has claimed this yet.
Domain: LS: Refactorings
Experience Enhancement
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.4k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
🔎 Search Terms
AllowUnresolveNames, "preserve type nodes"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about AllowUnresolvedNames and preserve types
⏯ Playground Link
💻 Code
interface A {
foo: import("./doesntexist.js").Foo;
get bar(): import("./doesntexist.js").Foo;
}
class B implements A {
// Trigger completion: "implement interface A" display this completion:
// Actual:
// foo: any;
// get bar(): any {
// throw new Error("Method not implemented.");
// }
// Expected:
// foo: import("./doesntexist.js").Foo;
// get bar(): import("./doesntexist.js").Foo {
// throw new Error("Method not implemented.");
// }
}
🙁 Actual behavior
Triggering completion uses any instead of the unresolved type.
🙂 Expected behavior
Completion should be the unresolved type instead of any
Additional information about the issue
Found in PR https://github.com/microsoft/TypeScript/pull/59440
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the completion behavior reproduced in the linked Playground when implementing interface A, focusing on completion getters/setters and property declarations. Compare the actual any output with the expected unresolved import type; done means all shown completions preserve import("./doesntexist.js").Foo instead of using any.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100