microsoft / microsoft/TypeScript
Variable merging
Open
Nobody has claimed this yet.
Needs Proposal
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
declare var test: (s: string) => void;
declare var test: {
(s: string) => void;
tests: any[];
}
At the moment TS compiler shows error: Subsequent variable declarations must have the same type.
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 declaration example in the TypeScript compiler and tracing the diagnostic for subsequent variable declarations. The work is done when the compatible declarations merge as requested while incompatible subsequent declarations continue to produce an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100