microsoft / microsoft/TypeScript
Goto definition after field exclusion should go to prop signature
Open
Nobody has claimed this yet.
Domain: LS: Symbol Navigation
Experience Enhancement
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: master
Code
type OmitKeys<A, B> = {[P in Exclude<keyof A, B>]: A[P]}
interface Foo {
a: number;
b: string;
c: boolean;
}
var c: OmitKeys<Foo, 'c'>;
c.a // goto definition doesn't work
Expected behavior:
Goto definition on c.a takes me to the Foo.a property
Actual behavior:
Goto definition doesn't work
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 reproducing the issue with the TypeScript snippet in the report, focusing on Go to Definition for c.a after the OmitKeys mapped type excludes c. Trace the TypeScript language-service path that resolves this location. Done means Go to Definition reaches Foo.a rather than failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100