Create a greeter.ts file:
class Student { fullname : string; constructor(public firstname, public middleinitial, public lastname) { this.fullname = firstname + " " + middleinitial + " " + lastname; }}interface Person { firstname: string; lastname: string;}function greeter(person : Person) { return "Hello, " + person.firstname + " " + person.lastname;}var user = new Student("Jane", "M.", "User");document.body.innerHTML = greeter(user);
Webstrom can add watcher to the ts file, it will auto convert to the javascript file.