Open kscory opened 6 months ago
type StartsWith<T extends string, U extends string> = T extends `${U}${string}` ? true : false;
type StartsWith<T extends string, U extends string> = T extends `${U}${string}` ? true : false
type StartsWith<T extends string, U extends string> = U extends '' ? true :T extends `${infer First}${U}${infer Rest}`?
`${First}` extends "" ?
true:
false :
false
답안을 작성해주세요.