Answer the question
In order to leave comments, you need to log in
How to write a generic interface?
There is such an object.
export const aside = {
well: {
name: "Колодец",
costs: "200/250/300",
src: "../images/shop/wells/well-01.png"
},
depot: {
name: "Склад",
costs: "150/200/250",
src: "../images/shop/depots/depot-01.png"
},
cage: {
name: "Клетка",
costs: "100/150/200",
src: "../images/shop/cages/cage-01.png"
}
};
export interface asideBl {
well: {
name: string,
costs: string,
src: string
},
depot: {
name: string,
costs: string,
src: string
},
cage: {
name: string,
costs: string,
src: string
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question