class VideoDataItem{
public url: string;
public name: string;
constructor(u: string, n: string){
this.url = u;
this.name = n;
}
}
class VideoDataMap {
[videoId: string]: VideoDataItem;
}
class MainClass {
private videoDataMap = new VideoDataMap();
public main(){
console.log("LOG INITIAL this.videoDataMap: " + JSON.stringify(this.videoDataMap));
this.videoDataMap["myVideo1"] = new VideoDataItem("video_url1", "video name1");
this.videoDataMap["myVideo2"] = new VideoDataItem("video_url2", "video name2");
console.log("LOG AFTER this.videoDataMap: " + JSON.stringify(this.videoDataMap));
}
}
new MainClass().main();