microsoft / microsoft/TypeScript
Merge same function signatures for intersection types
Open
Nobody has claimed this yet.
Awaiting More Feedback
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.6.0-dev.20190611
Search Terms: function signature merge
Code
interface X {
name: string;
method(): void;
}
interface Y {
index: number;
method(): void;
}
var z: X & Y;
z.method(); // <--- Put your cursor here
Expected behavior: IntelliSense should ideally show only one signature.
Actual behavior: It shows two exactly same signatures. Not harming, but weird.
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 provided TypeScript Playground reproduction and investigate the IntelliSense handling for identical method signatures produced by intersection types. Done means the completion or signature display for z.method() shows one signature instead of two while preserving distinct overloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100