I have the following issue, "Cannot find name 'readonly'" when defining an interface with readonly properties. I have installed the following version of typescript: v 2.0.8 and I am using Visual Studio 2015.
Here is a sample:
TypeScript
interface Car {
readonly engine: string;
readonly model: string;
}
Any ideas will be appreciated.
2.0.8version of typescript? Maybe your visual studio runs a different version? How did you install? Did you have a previous version installed before? Also, please add yourtsconfig.json.tsc -vdoesn't necessarily show the same version for what VS is running. Try this thread: stackoverflow.com/questions/23948348/… And this one: stackoverflow.com/questions/32385087/…