weekend project to make a simple web app using Typescript/Ionic/Angular.

hello.ts 477B

12345678910111213141516171819
  1. class Student {
  2. fullName: string;
  3. constructor(public firstName: string, public middleInitial: string, public lastName: string) {
  4. this.fullName = firstName + " " + middleInitial + " " + lastName;
  5. }
  6. }
  7. interface Person {
  8. firstName: string;
  9. lastName: string;
  10. }
  11. function greeter(person: Person) {
  12. return "Hello, " + person.firstName + " " + person.lastName;
  13. }
  14. let user = new Student("Jane", "M.", "User");
  15. document.body.innerHTML = greeter(user);