Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptstructural typing unsoundnessSingle-choice MCQ

TypeScript is structurally typed, yet the assignment below is rejected. What rule overrides structural compatibility here?

class A { private id = 0; } class B { private id = 0; } let a: A = new B();