I'm currently learning TypeScript and here is a snippet of source code:
export class ShoppingCartItem{
$key:string;
title:string;
imageUrl:string;
price:number,
quantity:number,
}
......
......
itemsMap: { [productId: string]: ShoppingCartItem };
Can someone explain the meaning of the last line ({ [productId: string]: ShoppingCartItem })? Does it indicate that itemsMap is an object? However...