type Has = [U1] extends [U] ? 1 : 0; type If = B extends 1 ? Then : Else; export type PrettyPrint = If, A, A extends Record ? { [K in keyof A]: PrettyPrint; } & unknown : A>; export {};