indexable type in ts code example
Example: indexable type in ts
//Indexable type Typescript
interface ListItem {
[prop: string ] : string | number ;
}
const List: ListItem = {
name: "joyous jackal" ;
email: "[email protected]";
age: 21 ;
}