摘要: Just for fun... Given a number (always positive) as a type. Your type should return the number decreased by one. For example: type Zero = MinusOne<1> 阅读全文
posted @ 2022-10-07 22:57 Zhentiw 阅读(41) 评论(0) 推荐(0) 编辑
摘要: You can use generics in React to make incredibly dynamic, flexible components. Here, I make a Table component with a generic 'items' type. interface T 阅读全文
posted @ 2022-10-07 18:13 Zhentiw 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Drop a specified char from a string. For example: type Butterfly = DropChar<' b u t t e r f l y ! ', ' '> // 'butterfly!' /* _____________ Your Code H 阅读全文
posted @ 2022-10-07 01:08 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑