import type { PickDeep } from "../types/object/pickDeep"; import type { PickDeepKey } from "../types/object/pickDeepKey"; /** * Creates a new object by deeply selecting properties from the source object based on specified keys. * * @template T - Type of the source object. * @template K - Type of property keys to select. Must be a subset of PickDeepKey. * @param {T} object - The source object to extract properties from. * @param {...K[]} keys - Property keys to extract. Can use dot notation for nested properties. * @returns {PickDeep} A new object containing only the specified properties. * * @remarks * **Prototype pollution warning:** This function does not filter out * prototype-polluting keys (`__proto__`, `constructor`, `prototype`). * If processing user-controlled input, sanitize with the appropriate * `removePrototype*` helper before calling this function: * - `removePrototype` — shallow sanitization of a single object * - `removePrototypeDeep` — recursive sanitization of a single object (for deeply nested data) * - `removePrototypeMap` — shallow sanitization of an array of objects * - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data) * * @example * ```typescript * const obj = { a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 }; * const picked = pickDeep(obj, 'a.b.c', 'f'); * // picked will be { a: { b: { c: 1 } }, f: 4 } * ``` */ export declare const pickDeep: []>(object: T, ...keys: K) => PickDeep;