mapValue.d.ts 299 B

123456789
  1. import type { ObjMap, ReadOnlyObjMap } from './ObjMap';
  2. /**
  3. * Creates an object map with the same keys as `map` and values generated by
  4. * running each value of `map` thru `fn`.
  5. */
  6. export declare function mapValue<T, V>(
  7. map: ReadOnlyObjMap<T>,
  8. fn: (value: T, key: string) => V,
  9. ): ObjMap<V>;