Descripción
Switch statement that assigns a value to a variable
File Template: ❌
Prefix
switch:assign
Scopes
typescript
Snippet de código
let ${1:result}: ${2:string};
switch (${3:value}: ${4:string}) {
case ${5:A}:
$1 = ${6:"Result A"};
break;
case ${7:B}:
$1 = ${8:"Result B"};
break;
default:
$1 = ${9:"Default result"};
}