microsoft / microsoft/TypeScript
Consider loose completions in the syntax server on unresolved/error types
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Assume that no type named Foo exists in the current project, and assume the current file.
export let x: Foo;
x./**/
When requesting completions at /**/, we should consider giving a list of identifiers in the current file, similar to what we do for any in JavaScript files. This contrived example isn't great, but when opening a larger file, this could be helpful.
This is somewhat related to
- https://github.com/microsoft/TypeScript/issues/5334, where we considered giving identifier completions whenever hitting
any - https://github.com/microsoft/TypeScript/issues/39032, where we discussed producing these special
loadingtypes and unresolved error types.
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 by tracing syntax-server completion handling for unresolved or error types, then compare it with identifier completions for any in JavaScript. Read issues #5334 and #39032 for context. Done means the shown position can offer identifiers from the current file without disrupting existing completion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100