UNPKG

759 BTypeScriptView Raw
1/**
2 * Executes the provided `callback` once for each enumerable own property in the
3 * object and constructs a new object from the results. The `callback` is
4 * invoked with three arguments:
5 *
6 * - the property value
7 * - the property name
8 * - the object being traversed
9 *
10 * Properties that are added after the call to `mapObject` will not be visited
11 * by `callback`. If the values of existing properties are changed, the value
12 * passed to `callback` will be the value at the time `mapObject` visits them.
13 * Properties that are deleted before being visited are not visited.
14 */
15declare function mapObject(obj: object | null | undefined, callback: any, context?: any): object | null | undefined;
16
17declare namespace mapObject {}
18
19export = mapObject;