Answer the question
In order to leave comments, you need to log in
How to write an interface for such an object in TypeScript?
Hello, tell me how to write an interface for an object of this type:
segmentsTaxonomy:
1: {segmentName: "GenderMale", segmentDescription: "Male client"}
2: {segmentName: "GenderFemale", segmentDescription: "Female client"}
3: { segmentName: "Recency1", segmentDescription: "Customer bought recently"}
4: {segmentName: "Recency2", segmentDescription: "Customer bought recently"}
5: {segmentName: "Recency3", segmentDescription: "Customer bought a long time ago"}
6 : {segmentName: "Recency4", segmentDescription: "Customer bought a long time ago"}
7: {segmentName: "Recency5", segmentDescription: "Customer bought a very, very long time ago"}
8: {segmentName: "Frequency1", segmentDescription: "Cleanet buys often"}
9: {segmentName: "Frequency2", segmentDescription: "Client doesn't buy very often"}
10: {segmentName: "Frequency3", segmentDescription: "Customer buys rarely"}
11: {segmentName: "Frequency4", segmentDescription: "Customer buys very rare"}
I just can't figure it out. Help plz.
Answer the question
In order to leave comments, you need to log in
interface SegmentsTaxonomy {
[x: number]: {
segmentName: string;
segmentDescription: string;
};
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question