is it possible to set something like this with typescript?
interface SomethingElse {}
type Fruits = {
banana: boolean,
apple: boolean,
melon: boolean,
//.... 1000 records
grape: boolean
}
const list: { [key: keyof fruits]: SomethingElse }
what i am trying to archive here is reuse the keys from fruits to create a new type that is no longer boolean, as you see i could create a new interface/type where i could assign the type as SomethingElse however that means i would need to duplicate all the fruits keys........
would it fit in a feature request? or you guys think this is non sense?
is it possible to set something like this with typescript?
what i am trying to archive here is reuse the
keysfrom fruits to create a new type that is no longerboolean, as you see i could create a new interface/type where i could assign the type asSomethingElsehowever that means i would need to duplicate all the fruits keys........would it fit in a feature request? or you guys think this is non sense?