Check repeated chars

Medium
union types
indexed types
conditional types
template literal
infer
recursion

Description:

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

For example:

type CheckRepeatedChars<'abc'> // false type CheckRepeatedChars<'aba'> // true

Code

Loading...