Bob Nedwor wrote:Thanks, everyone but I thought that the idea of tcs is to transpile TypeScript into Javascript. It works great without the --target option.
The default is ES3.
I think the point you are missing is that the transpiler is generating JavaScript code. The language features that you are using in your TypeScript code are
identical in ES2018, so other than removing blank lines and maybe comments, you will not see any difference.
In my last post I tried to show that when you use something in TypeScript where there is no translatable concept it may just get dropped. Other features like TypeScript
enums for example, will get polyfilled with something functionally equivalent. For example:
TypeScript
ES2018