I'm trying to figure out a way to utilize TS/IDE to display specific literal values from a style guide object, instead of just the inferred type. Here's an example:
const guide = {
colors: {
black: {
medium: "#000000",
},
blue: {
medium: "#3884F7",
dark: "#053986",
}
...
},
typography: {
font: {
family: "Commissioner",
size: {
xxs: "11px",
xs: "12px",
s: "14px"
...
},
},
};
Is there a way to specifically define guide.colors.blue.dark
as "#053986"
rather than just a generic string
, without manually creating a new type object for the entire structure?