Collection of TypeScript type challenges with online judge
Home Page:https://tsch.js.org/
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
sunupupup opened this issue a month ago · comments
type ReplaceFirst< T extends readonly unknown[], S, R, > = T extends [infer First, ...infer Rest] ? First extends S ? [R, ...Rest] : [First, ...ReplaceFirst<Rest, S, R>] : []