interface User { name: string; age: number }
const u: User = createUser('Alice', 30)
// β { name: 'Alice', age: 30 }An interface defines the required shape β any object with matching properties satisfies it.
Interfaces define the shape of an object. TypeScript uses structural typing β any object with matching properties satisfies an interface.
Challenge: Implement createUser(name, age) returning an object with name: string and age: number.
createUser('Alice', 30) // β { name: 'Alice', age: 30 }