microsoft / microsoft/TypeScript
Support @ts-ignore for specific errors
Open
Nobody has claimed this yet.
Revisit
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 2.6.0-dev.20171011
Code
function countDown(n: number): void {
switch (n) {
// @ts-ignore
case 1:
console.log("1");
// intentional fall through
case 0:
console.log("0");
}
}
Expected behavior:
Ability to make ts-ignore apply to the --noFallthroughCasesInSwitch error but not to other errors.
Actual behavior:
case "1": would also compile.
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 TypeScript repro in the issue and inspect how the @ts-ignore comment is applied alongside --noFallthroughCasesInSwitch. Verify the behavior against both the intentional fall-through diagnostic and the case "1" type error; done means the former can be suppressed without suppressing the latter.
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
- 35/100