Due to TypeScript's typing system, manually declaring protocol conformance is rare. In the above example, TheClass automatically conforms to TheProtocolA if it implements TheProtocolA's required methods.
To ease syntax highlighting and parsing, we could unify class inheritance and protocol conformance:
Currently, we mirror Objective-C syntax for protocol conformance:
Due to TypeScript's typing system, manually declaring protocol conformance is rare. In the above example,
TheClass
automatically conforms toTheProtocolA
if it implementsTheProtocolA
's required methods.To ease syntax highlighting and parsing, we could unify class inheritance and protocol conformance:
The following would be errors: 1) A class may not inherit from more than one superclass. 2) A protocol may not "inherit" from a class.