Reputation: 99
When the type is declared as in the code block below
When declaring a new type C is an object, the key value is the key value of A, and the type of each key is B.
How to declare C with only A and B..?
type A = {
home: string
info:string
about:string
}
type B = "open" | "close"
desired result
type C = {
home: "open" | "close"
info:"open" | "close"
about:"open" | "close"
}
Upvotes: 1
Views: 193