I am doing the angular2
tutorial at this address: https://angular.io/docs/ts/latest/tutorial/toh-pt3.html I have put the hero
interface in a single
I faced same issue.
I restarted my server and it works fine. Seems like a bug.
Sometimes this error occurs when the .ts file is not saved. So make sure all files in the project are saved otherwise try to restart the editor.
My Resolution,
In my case, I have created a model file and kept it blank,
so when I imported it to other model, It gives me error. so write the definition when you create a model typescript file.
I found that not only did I have to restart Visual Studio Code but the node server process as well before I could get a good compile.
I was facing same issue, tried restarting my server, reopening editor but computer restart did the magic.
P.S: I was facing issue on a windows machine and issue occurred when I moved module into a new folder.
I ran into the same issue in VSC. Did restarted the editor and started the application again. It worked fine.