Hey there! I'm brand new to Visual Studio and just created a simple TypeScript file called Test.ts. Check out the code below:
let hm:Map<number,String> = new Map<number,String>();
let uname=1;
let pass="String";
hm.set(uname,pass);
console.log(hm);
I tried compiling the file using tsc Test.ts
However, I encountered the following error. Can anyone help me resolve this issue? Please note that I am not working with Angular, just a regular TypeScript file.
Test.ts:1:8 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2015' or later.
1 let hm:Map<number,String> = new Map<number,String>();
Any suggestions on how to resolve this error? Would using a tsconfig.json file be necessary, or can I directly change the editor to use a later version of es2015?