{ label: "Lorem", value: "flash" },
{ label: "Lorem ", value: 3 },
{ label: "Lorem ", value: 5 },
];
And i want to know how can i extract all the type from all the property "value" of the objects in this array... any idea how can i get this done with ts? any resources that i can check?
How do you want it here? Send what you are expecting
i want to get something like this
You want it as key value pair
is what i posted not an union type? 🤔 (type1 | type2 | type3 | .. | typeN) -> union type
Send the exact type you want in code
typesFromArrayObject === all the types that exist in the 'value' field of the objects than contain the array that i send earlier
typeof foo[number]["value"]
Thanks ! I will check it
Обсуждают сегодня