DefinitelyTyped/types/object-map/index.d.ts
Wolfgang Faust e07dba0a0e Add type definitions for object-map. (#20114)
* Add type definitions for object-map.

* Rename object-map's type variables.

Per suggestion from @plantain-00

* object-map: Declare TThis type for thisArg.

Per suggestion from @andy-ms.
2017-10-04 09:09:50 -07:00

13 lines
475 B
TypeScript

// Type definitions for object-map 1.0
// Project: https://github.com/xixixao/object-map
// Definitions by: Wolfgang Faust <https://github.com/wolfgang42>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function objectMap<TInput, TOutput, TThis>(
target: {[k: string]: TInput},
callback: (this: TThis, currentValue: TInput, key: string, object: {[k: string]: TInput}) => TOutput,
thisArg?: TThis
): {[k: string]: TOutput};
export = objectMap;