/** * Utility type that converts an object to recursively have optional properties. * This includes items an arrays and return values for functions. */ import { InputSignal, InputSignalWithTransform } from '@angular/core'; export type RecursivePartial = Partial<{ [key in keyof T]: T[key] extends InputSignal | InputSignalWithTransform ? RecursivePartial : T[key] extends (...a: Array) => any ? (...a: Array) => RecursivePartial> | ReturnType : T[key] extends Array ? Array> : RecursivePartial | T[key]; }>;