Given a countries array like this:
const countries = [
{ name: "Australia", code: "AU" },
{ name: "Japan", code: "JP" },
{ name: "Norway", code: "NO" },
{ name: "Russian Federation", code: "RU" }
];
What's the easiest way to generate the following type?
type CountryCodes = "" | "AU" | "JP" | "NO" | "RU";
Note: there is an extra empty string.