Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
331 B
9 lines
331 B
1 year ago
|
/**
|
||
|
Recursively split a string literal into two parts on the first occurence of the given string, returning an array literal of all the separate parts.
|
||
|
*/
|
||
|
export type Split<S extends string, D extends string> =
|
||
|
string extends S ? string[] :
|
||
|
S extends '' ? [] :
|
||
|
S extends `${infer T}${D}${infer U}` ? [T, ...Split<U, D>] :
|
||
|
[S];
|