摘要: Let's say you extends from a base class, you intent to override a method in base class class BaseCmp { showCmp() {} hideCmp() {} helperMethod() {} } c 阅读全文
posted @ 2022-11-18 15:31 Zhentiw 阅读(80) 评论(0) 推荐(0) 编辑
摘要: You can give Getter or Setter different types. So that Setter can accpet a wider range of types, while Getter can return a narrow type. class Thing { 阅读全文
posted @ 2022-11-18 15:22 Zhentiw 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Implement a type LengthOfString<S> that calculates the length of the template string (as in 298 - Length of String): type T0 = LengthOfString<"foo"> / 阅读全文
posted @ 2022-11-18 02:37 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑