ZH 接口也可以通过 extends 操作符扩展。
ZH 接口也可以通过 extends 操作符扩展。
EN Interfaces can be extended like classes using the extends operator.
ZH 例如,假设 A 和 B 都是一个类的别名, 而 A|B 仍然是有效的,哪怕它可以被简化为 A 或 B。 同样的,如果 B extends A {},那 A|B 仍然是有效的联合类型,尽管它可以被简化为 A。
EN For example, if A and B are class aliases, then A|B remains a legal union type, even though it could be reduced to either A or B. Similarly, if class B extends A {}, then A|B is also a legal union type, even though it could be reduced to just A.
ZH // 关键词顺序至关重要: 'extends' 必须在前面
EN // The keyword order here is important. 'extends' must come first.
Mostrando 3 de 3 traduções