First and foremost, it may be worth mentioning that I am writing an Electron application and would like to use typescript for a number of reasons. Unfortunately, I am running into some issues and have been spinning my wheels on this for several hours at this point, so I would greatly appreciate any insight as I'm very new to typescript.
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"sourceMap": true,
"moduleResolution": "node"
},
"compileOnSave": true
}
renderer.ts
import Case from "../typescript/case";
This results in the following for the above line:
Uncaught SyntaxError: Unexpected identifier
case.ts
import Client from "./client";
export default class Case {
CaseNumber: number;
Client: Client;
DateOfInjury: Date;
LastUpdated: Date;
LastUpdatedBy: string;
constructor() {
this.CaseNumber = 0;
this.Client = new Client();
this.DateOfInjury = new Date();
this.LastUpdated = new Date();
this.LastUpdatedBy = "";
}
}
I have tried a number of variations of the above to get past this error but have been unsuccessful in finding a solution. Perhaps someone with more experience in this space can provide some guidance?