Quiz · Unions and literal types · lesson 6 of 8
Quiz — let and a literal type
What does tsc report for this program?
type Size = "S" | "M" | "L";
function order(size: Size) {
console.log(size);
}
let mine = "M";
order(mine);What does tsc report for this program?
type Size = "S" | "M" | "L";
function order(size: Size) {
console.log(size);
}
let mine = "M";
order(mine);