export interface AutomationTestingProps { /** * Used by cypress to identify this property. * * Change with care and communicate this with QA */ 'data-cy': string; } declare module 'react' { interface HTMLAttributes extends AriaAttributes, DOMAttributes, Partial { // keep AutomationTestingProps 'data-cy' optional because HTMLAttributes covers non interactive elements } } export type WithRequiredProperties = Omit & Required>; export type ValueOf> = T[keyof T]; /** * Recursively makes all properties of a type optional, including nested objects. * Unlike TypeScript's built-in Partial which only affects top-level properties, * DeepPartial applies the optional modifier to all levels of nested objects. * * @example * ```ts * interface Config { * name: string; * settings: { * theme: string; * options: { * darkMode: boolean; * }; * }; * } * * // All properties at all levels are now optional * type PartialConfig = DeepPartial; * // Equivalent to: * type PartialConfig = { * name?: string; * settings?: { * theme?: string; * options?: { * darkMode?: boolean; * }; * }; * } * ``` */ export type DeepPartial = T extends object ? { [K in keyof T]?: DeepPartial } : T;