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

What does the recursive type `Paths<T>` produce for the input below?

type Paths<T> = T extends object ? { [K in keyof T & string]: T[K] extends object ? `${K}.${Paths<T[K]>}` : K }[keyof T & string] : never; type R = Paths<{ a: { b: number }; c: string }>;