UNPKG

typedash

Version:

modern, type-safe collection of utility functions

13 lines (12 loc) 687 B
import { t as CastToString } from "./CastToString-njj4K8EX.cjs"; //#region src/functions/mapKeys/mapKeys.d.ts /** * Returns a new object with the same values as the given object, but with each key mapped to a new key as returned by the given mapper function. * @param object The object to map the keys of. * @param mapperFunction The function to map the keys with. * @returns A new object with the mapped keys. */ declare function mapKeys<T extends object, K extends PropertyKey>(object: T, mapperFunction: (key: CastToString<keyof T>, value: T[keyof T], object: T) => K): Record<K, T[keyof T]>; //#endregion export { mapKeys as t }; //# sourceMappingURL=mapKeys-CN3QcdS6.d.cts.map