namespace UserSubtypeOfNamed { class User { name : string ; age : number ; constructor ( name , age ) { this . name = name ; this . age = age ; } } interface Named { name : string ; } function greet ( named ) { console . log ( `Hi ${ named . name }!` ) ; } greet ( new User ( "Alice" , 25 ) ) ; }