TypeScript/tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements01.ts
2016-07-06 21:00:47 -07:00

13 lines
168 B
TypeScript

let x: "foo";
let y: "foo" | "bar";
switch (x) {
case "foo":
break;
case "bar":
break;
case y:
y;
break;
}