/** * Creates a new object composed of the picked object properties. * * This function takes an object and an array of keys, and returns a new object that * includes only the properties corresponding to the specified keys. * * @template T - The type of object. * @template K - The type of keys in object. * @param {T} obj - The object to pick keys from. * @param {K[]} keys - An array of keys to be picked from the object. * @returns {Pick} A new object with the specified keys picked. * * @example * const obj = { a: 1, b: 2, c: 3 }; * const result = pick(obj, ['a', 'c']); * // result will be { a: 1, c: 3 } */ declare function pick, K extends keyof T>(obj: T, keys: readonly K[]): Pick; /** * Creates a new object composed of the picked object properties. * * This function takes an object and an array of keys, and returns a new object that * includes only the properties corresponding to the specified keys. * * @template T - The type of object. * @param {T | null | undefined} obj - The object to pick keys from. * @param {...any} keys * @param {PropertyKey | PropertyKey[] | PropertyKey[][]}} keys - An array of keys to be picked from the object. received keys goes through a flattening process before being used. * @returns {Partial} A new object with the specified keys picked. * * @example * const obj = { a: 1, b: 2, c: 3 }; * const result = pick(obj, ['a', 'c']); * // result will be { a: 1, c: 3 } * * // each path can be passed individually as an argument * const obj = { a: 1, b: 2, c: 3 }; * const result = pick(obj, 'a', 'c'); * * // pick a key over a path * const obj = { 'a.b': 1, a: { b: 2 } }; * const result = pick(obj, 'a.b'); * // result will be { 'a.b': 1 } */ declare function pick(obj: T | null | undefined, ...keys: Array>): Partial; export { pick };