Flatten<T>:(T extends (infer U)[] ? U extends ObjectType<U> ? UnionObjectProps<U> | U : never : T extends ObjectType<T> ? UnionObjectProps<T> | T : never) extends infer V ? Exclude<V, undefined> : never
Creates a union type of all possible recursive child nodes (arrays and
objects) of an object type T. Also includes T itself if it is not an array or native object type. Does not recurse into native objects.
Creates a union type of all possible recursive child nodes (arrays and objects) of an object type T. Also includes T itself if it is not an array or native object type. Does not recurse into native objects.