Find the unsupported object cases in this generated DeepReadonly utility.
TypeScript
type DeepReadonly<Value> = Value extends object
? { readonly [Key in keyof Value]: DeepReadonly<Value[Key]> }
: Value;
type Settings = {
updatedAt: Date;
onChange: (theme: string) => void;
tags: string[];
};
declare const settings: DeepReadonly<Settings>;
settings.onChange("dark");
console.log(settings.updatedAt.getTime());