Is it possible to extract the "keys" of a type like i would do with an object and save use them (storing in a variable, mapping, etc)?
consider the object variant:
const obj = { 0: 'a', 1: 'b', 2: 'c' };
const objWithKeys = Object.keys(obj);
console.log(objWithKeys); // console output: ['0', '1', '2']
can i do the same somehow for a type and then use those keys for something like a dropdown menu?
type scheme = "dhcp" | "static";
const schemeItems = Object.keys(scheme);
const console.log(schemeItems); // would like to have ["dhcp","static"]
Is this somehow possible to get the desired results and if not why and what should you do instead?