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
Had the same issue, got it worked with this... for a single file!
tsc -target "es5" filename && node filename
"es5"
need not mention file extensions
tsc -target "es5" filename - transpiles the typescript to "es5" JavaScript
tsc -target "es5" filename
node filename - runs the transpiled javascript file
node filename