Recently, I've been attempting to run a .ts file as a console application. Despite successfully converting the .ts files to .js using tsc without any errors, I'm encountering an issue when trying to launch the .ts file with ts-node:
"SyntaxError: Unexpected token ..."
Upon reviewing my tsconfig.json file, the settings are as follows:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"strict": true,
"esModuleInterpop": rue
}
}
The TypeScript code snippet involved is as follows:
constructor(... pieces : IPiece[]){
super();
for (let i = 0; i < pieces.length; i++) {
this.add(pieces[i]);
}}
This discrepancy leads me to believe that tsc and ts-node compile .ts files differently. Any suggestions or insights on this matter would be greatly appreciated. Thank you.