function greet(n: Named) { console.log("Hello, " + n.name); } greet(y); // OK