How could I type Select's props so that the defaultValue is constrained to one of the options values ("au" | "nz" in this example)?
const countryOptions = [
{
value: "au",
label: "Australia",
},
{
value: "nz",
label: "New Zealand",
}
] as const;
// This should produce an error because "foo" is neither "au" or "nz"
<Select options={countryOptions} defaultValue="foo" ... />