I am trying to run this code but it is giving me following errors:
Animal.ts(10,13): error TS1056: Accessors are only available when targeting ECMAS
Using Visual Stido 2017 ?
1- Solution Explorer>Right Click To Project
2- Add>New Item
3- (Search section >type this> typescript)
4- Select "TypeScript Json Configuration File"
thats it
at the end of this steps, tsconfig.json will be added to project with default set applied to ES5
you don't have to change anything. just recompile your project and error gonna out.