microsoft / microsoft/TypeScript
Go to definition should still work for shorthand property declaration with no local binding
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
declare function foo(option: { [|abcd|]: number }): void;
foo({
abcd/*use*/
});
Go to definition at /*use*/.
Expected: Language service gracefully finds abcd.
Actual: No definition is available.
This is frustrating because much of the time as I'm actually writing out the type, I want to know what abcd is so I'll jump to its definition. Instead, I can't get any functionality.
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
Reproduce the issue with the TypeScript snippet and invoke Go to Definition at the marked use of abcd. Start by tracing the language-service definition lookup for shorthand property declarations with no local binding. Done means the lookup gracefully resolves abcd instead of returning no definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100