Open shaKY-iota opened 2 years ago
https://github.com/type-challenges/type-challenges/issues/481#issue-764455538
// your answers
type Trimmable = " " | "\n" | "\t"
type Trim<S extends string> = S extends `${Trimmable}${infer T}` | `${infer T}${Trimmable}` ? Trim<T> : S