title: classes and Interfaces in Typescript
body: <p>I am in the beginning of learning TypeScript. I come from a strongly-typed language (c#) and have some knowledge in JS.</p>
  
  <p>Quite at the beginning I fell over the following example:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>Now I am a bit confused. I would expect something like <code>Student:Person</code> (c#) or <code>Student implements Person</code> (Java)
  So: Why does <code>greeter()</code> accept an object of class "<code>Student</code>"? I did not see any clue that "<code>Student</code>" implements "<code>Person</code>".</p>
  
  <p>is it just about the property names?
  So if I add another class</p>
  
  <pre><code>class Teacher {
    salaray:int,
    firstName:string,
    lastName:string
  }
  </code></pre>
  
  <p>an object of that class would also be a valid parameter for <code>greeter()</code>?</p>