Skip to content
Quiz · Unions and literal types · lesson 6 of 8

Quiz — let and a literal type

What does tsc report for this program?

TypeScript
type Size = "S" | "M" | "L";

function order(size: Size) {
    console.log(size);
}

let mine = "M";
order(mine);