export type TGetAllSamePropsFromObjArgs = Parameters; export type TGetAllSamePropsFromObjReturn = ReturnType; /** * Gets all values inside an object by the specified key, including deeply nested and circular objects. * @template T * @param {Record} obj Source object (can be nested) * @param {string} prop Property name to collect values for * @returns {T[]} Collected values * @throws {TypeError} getAllSamePropsFromObj: prop must be a non-empty string * @throws {TypeError} getAllSamePropsFromObj: obj must be an object * @example * // How to get all duplicate key values inside an object? * const myObj = { * someProp1: { * a: "value 1", * b: 2, * c: 3, * d: { * a: 1, * b: 2 * } * }, * someProp2: { * a: "value 3", * b: 2, * c: { * a: "value 4" * } * } * } * getAllSamePropsFromObj(myObj, "a") // [ "value 1", 1, "value 3", "value 4" ] * @example * // Collect every category id from a nested navigation tree * const categoryIds = getAllSamePropsFromObj(navigation, "categoryId"); */ export declare const getAllSamePropsFromObj: (obj: unknown, prop: string) => T[];