2822 - Split
Opened this issue · 0 comments
koSakano commented
type Split<S extends string, SEP extends string> = S extends `${infer First}${SEP}${infer Second}` ? [First, ...Split<Second, SEP>] : S extends '' ? (SEP extends '' ? [] : ['']) : S extends `${infer Rest}` ? [Rest] : string[];