question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide editor feature for filling in 'switch' cases for common scenario

See original GitHub issue

Hi,

Not a bug, but a feature request please. Have been asked to post feature request here.

Version Used: N/A

Steps to Reproduce:

  1. Create an enum.
  2. Create a variable in a method for that enum, assign value.
  3. 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:open
  • Created 4 years ago
  • Reactions:7
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
AlCalzonecommented, Jan 17, 2020

@TypeScript team, pretty please 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found