CHALLENGE 1: Create a User Type Alias ====================================== SOLUTION: type User = { id: number; username: string; email: string; isVerified?: boolean; }; // Create user objects using the type alias const user1: User = { id: 1, username: "alice_wonder", email: "alice@example.com", isVerified: true }; const user2: User = { id: 2, username: "bob_builder", email: "bob@example.com" // isVerified is optional, so it can be omitted }; const user3: User = { id: 3, username: "charlie_brown", email: "charlie@example.com", isVerified: false }; EXPLANATION: - "type User = { ... }" — defines a reusable type alias - "id: number" — required; uniquely identifies the user - "username: string" — required; user's login name - "email: string" — required; user's contact email - "isVerified?: boolean" — optional; has ? to indicate it's not required BENEFITS OF TYPE ALIASES: - Reuse: define once, use everywhere - Consistency: all users have the same structure - Clarity: reads like documentation - Easy to refactor: change the type definition in one place TESTING: ✅ Works: { id: 1, username: "test", email: "test@ex.com" } ✅ Works: { id: 1, username: "test", email: "test@ex.com", isVerified: true } ❌ Error: { id: "1", username: "test", email: "test@ex.com" } (id should be number) ❌ Error: { username: "test", email: "test@ex.com" } (missing id, which is required)