Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptrecursive typesSingle-choice MCQ

Which is the inferred type T for a recursive Join helper?

type Join<T extends readonly string[], D extends string> = T extends readonly [infer H extends string, ...infer R extends readonly string[]] ? R extends [] ? H : `${H}${D}${Join<R, D>}` : "";\ntype T = Join<["a","b","c"], "-">;