Back to Type Challenges

README

questions/09142-medium-checkrepeatedchars/README.md

latest1.5 KB
Original Source
<!--info-header-start--><h1>CheckRepeatedChars </h1><blockquote><p>by Hong <a href="https://github.com/RThong" target="_blank">@RThong</a></p></blockquote><p><a href="https://tsch.js.org/9142/play" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.zh-CN.md" target="_blank"></a> </p><!--info-header-end-->

Implement type CheckRepeatedChars<S> which will return whether type S contains duplicated chars?

For example:

ts
type CheckRepeatedChars<'abc'>   // false
type CheckRepeatedChars<'aba'>   // true
<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/9142/answer" target="_blank"></a> <a href="https://tsch.js.org/9142/solutions" target="_blank"></a> <!--info-footer-end-->