Quiz · Interfaces and structural typing · lesson 2 of 12Quiz — an interfaceWhat is an interface in TypeScript?[A]An interface is an object that stays in the JavaScript file: it keeps the property names and their types, so the running program can read that list and check every object it receives against it, one property at a time, before using it.[B]An interface lists properties only: methods cannot be described in it at all, and ? and readonly work only in type aliases, so an object that has a method is described with type.[C]An interface names the shape of an object: its properties and methods with their types. Members may be optional (?) or readonly. tsc checks objects against it, and the interface is erased: the JavaScript has none of it.[D]An interface is another way to write a class: it holds method bodies and a constructor, and new applied to the interface creates a working object that already has all of its members.← BackInterfacesNext →Extending and intersecting