Difficulty: 5/10type aliases, interfaces, union typesTypes in TypeScript can be defined using the: 1type keyword or the2interface keyword.javascriptCopyScenario Questions0-2 years experience1We have a function that takes a user object with name and age. How would you define a type for that parameter in TypeScript?2If you need to represent a value that can be either a string or a number, how would you declare its type?2-5 years experience1You added a new property to an existing interface used across several modules, and now a component is failing to compile. Walk me through how you would debug the type error.Follow-up QuestionsCan you give an example where using a type alias would be preferable to an interface?How does enabling 'strictNullChecks' affect your type definitions?What tools or lint rules do you use to keep type definitions consistent across a large codebase?Suggest Improvement