type Method = "GET" | "POST"; type Path = "/users" | "/posts"; // every combination of the two unions type Route = `${Method} ${Path}`; const r: Route = "GET /users"; console.log(r);
cross-product of two literal unions