The short answer is yes. Customer correctly implements Person since all fields of the interface are optional. Any object will correctly implement the interface.
The usefulness of this interface is:
- On the implementer site, if any optional field is declared, the type must correspond (so
phonehas to be defined asnumber) - On the receiving side (for example, as a function parameter), you can only access fields that are potentially part of
Person(you should check if they areundefined), but the function, for example, guarantees it will not access any other fields of aPersonparameter.