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



