import { type Maybe } from '../value/maybe.type'; export type CopySelectModelFieldsConfig = Partial>; export type CopyModelFieldsConfig = { [K in keyof T]: Maybe; }; export interface CopyModelFieldConfig { /** * Default value if not presented. If default is not defined and there is no value, the key will be ignored entirely. */ readonly default?: V; } /** * Used for copying one field from one partial object to a target object. */ export type CopyModelFieldFunction = (from: Partial, target: Partial) => void; /** * Creates a function that copies a single field from a partial source object to a partial target object. * * If the field exists on the source, its value (or the configured default if null) is assigned to the target. * If the field does not exist on the source but a default is configured, the default is used. * Otherwise, the target is left unchanged. * * @param key - The property key to copy. * @param inputConfig - Optional config with a default value for the field. * @returns Reusable mapper that copies the configured field (or fills in the default) per pair. * * @dbxUtil * @dbxUtilCategory model * @dbxUtilKind factory * @dbxUtilTags model, copy, field, factory, default * @dbxUtilRelated make-model-map-functions, modify-model-map-functions * * @__NO_SIDE_EFFECTS__ */ export declare function makeCopyModelFieldFunction(key: keyof T, inputConfig?: Maybe): CopyModelFieldFunction;