Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyTypeScriptinterface vs type aliasSingle-choice MCQ

One of these two declarations compiles and the other is a duplicate-identifier error. Which statement is correct?

interface User { id: number; } interface User { name: string; } type Account = { id: number; }; type Account = { name: string; };