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
I was having the same problem. What I read from the docs is that the tsconfig.json file is ignored if you specify the files.
My tsconfig.json file
{ "compilerOptions": { "target": "es5" }, "include": [ "*.ts" ] }
And I run it from command line
tsc && node *.js