Quiz · Interfaces and structural typing · lesson 6 of 12Quiz — shape, not nameWhy does an object literal you never declared as a Point satisfy a Point parameter?[A]Because an interface is erased before tsc checks the program, so the parameter really has the type any; declaring Point as a type alias instead would make tsc demand the name Point.[B]Because tsc compares the property names only: an object whose x holds a string fits Point as well, and the wrong type shows up only later, at run time, when the program tries to do some arithmetic with that x.[C]Because tsc trusts object literals: a literal written by hand is let through without any check at all, while a value that comes from a variable fits only if it was declared with the type Point.[D]TypeScript compares types by shape, not by name. A value fits Point once it has every property Point requires, with the right types; nothing ties it to the name Point. In Java or C#, the name must match.← BackStructural typingNext →Excess properties in a literal