/** * Maps through entries of the given object and returns values by the given key. * * @param object - The object to map * @param key - The key to map with * @returns The values by the given key * * @category Collection * @public */ export default function map(object: { [key: string]: ValueType; }, key: Key): ResultType[]; /** * Maps through entries of the given object and collects values returned from the mapper function. * * @param object - The object to map * @param mapper - The mapper function * @returns The values returned from the mapper function * * @category Collection * @public */ export default function map(object: ObjectType, mapper: (element: ValueType, index: Key) => ResultType): ResultType[]; /** * Maps through elements of the given array and returns values by the given key. * * @param array - The array to map * @param key - The key to map with * @returns The values by the given key * * @category Collection * @public */ export default function map(array: ElementType[], mapper: Key): ResultType[]; /** * Maps through elements of the given array and collects values returned from the mapper function. * * @param array - The array to map * @param mapper - The mapper function * @returns The values returned from the mapper function * * @category Collection * @public */ export default function map(array: ElementType[], mapper: (element: ElementType, index: number) => ResultType): ResultType[];