interface Person { name: string; age: number; } function greet(person: Person) { return "Hello " + person.name; } Try