I am trying to launch .ts file as console app. After converting .ts files to .js (through tsc) there was no error, but I can't launch .ts file with ts-node because of issue:
"SyntaxError: Unexpected token ..."
My tsconfig.json file is
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"strict": true,
"esModuleInterpop": rue
}
}
Typescript code is
constructor(... pieces : IPiece[]){
super();
for (let i = 0; i < pieces.length; i++) {
this.add(pieces[i]);
}}
So I guess that tsc and ts-node compile .ts files differently. Any ideas? Thanks.