Provide editor feature for filling in 'switch' cases for common scenario
See original GitHub issueHi,
Not a bug, but a feature request please. Have been asked to post feature request here.
Version Used: N/A
Steps to Reproduce:
- Create an enum.
- Create a variable in a method for that enum, assign value.
- Type sw(tab)(tab) and press Enter.
Expected Behavior: Like C#, enum values to be auto-listed as cases.
let status: StatusETW = etw.EtwStatusId as StatusETW;
switch (status) {
case StatusETW.Cancelled:
break;
case StatusETW.Completed:
break;
case StatusETW.Draft:
break;
case StatusETW.EligibleToWork:
break;
case StatusETW.Expired:
break;
case StatusETW.UnComplete:
break;
case StatusETW.Unlock:
break;
default:
break;
}
Actual Behavior: This happens:
let status: StatusETW = etw.EtwStatusId as StatusETW;
switch (status) {
default:
}
Kind Regards.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Switch between various sets of values by using scenarios
A Scenario is a set of values that Excel saves and can substitute automatically on your worksheet. You can create and save different...
Read more >Top 8 Free PDF Form Fillers in 2022
In general, a great PDF form filler can basically allow you to create, edit, fill and sign forms. For these features, what you...
Read more >Scenario Editor - Train Simulator Developer Documentation
This section explains the principles to allow you to create and modify your own Scenarios. Before describing the details of Scenario creation, it...
Read more >15 Creative Editing Techniques Every Video Editor Should ...
Check out 13 of the editing techniques we'll cover in the video below! ... This is the most common cut and doesn't really...
Read more >Multiple Choice Question - Qualtrics
Request response: Request that the respondent try to answer the question before they proceed, but give them the option to refuse. Add validation:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Finally, I have made this.
https://marketplace.visualstudio.com/items?itemName=heroboy.generate-switch-case-for-enum-type
@TypeScript team, pretty please 😃