mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* 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.
13 lines
475 B
TypeScript
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;
|