javascript - Typescript interface readonly fields (Cannot find name 'readonly') -


i have following issue, "cannot find name 'readonly'" when defining interface readonly properties. have installed following version of typescript: v 2.0.8 , using visual studio 2015.

here sample:

typescript

interface car {     readonly engine: string;     readonly model: string; } 

any ideas appreciated.

you need figure out error. within visual studio (i.e. intellisense or during project build). or during compilation node (webpack or something) uses package.json e.g., have 2.0.8.

since have not seen 2.0.8 visual studio, updated version node. bet error visual studio version of typescript. need update visual studio.

unfortunately cannot directly extensions view, should work. need download yourself: https://www.microsoft.com/en-us/download/details.aspx?id=48593


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -