Hello TS family,
Is it possible to create a tuple type from a constant? Ex:
const objTuple = [
{
name: 'name1',
value: 10
},
{
name: 'name2',
value: 4
}
];
// How to generate this tuple type automatically by detecting the type of the 'value' property and number of elements in objTuple
type TTuple = [number, number];