/** * Prefixes all keys of an object type with a given string while preserving camelCase. * The original key name is capitalized before being appended to the prefix. * * @typeParam T - Object type whose keys will be prefixed. * @typeParam Prefix - String prefix to add to each key. * * @example * type Original = { type: boolean; weight: number }; * type WithText = PrefixKeys; * // Result: { textType: boolean; textWeight: number } */ export type PrefixKeys = { [K in keyof T as `${Prefix}${Capitalize>}`]: T[K]; };