Skip to content

Commit 61d0afc

Browse files
fix(common): Fix signature of for objects (make target optional)
1 parent 5a78f47 commit 61d0afc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export function find(collection: any, callback: any) {
295295
export let mapObj: <T, U>(collection: { [key: string]: T }, callback: Mapper<T, U>, target?: typeof collection) => { [key: string]: U } = map;
296296
/** Given an array, returns a new array, where each element is transformed by the callback function */
297297
export function map<T, U>(collection: T[], callback: Mapper<T, U>, target?: typeof collection): U[];
298-
export function map<T, U>(collection: { [key: string]: T }, callback: Mapper<T, U>, target: typeof collection): { [key: string]: U };
298+
export function map<T, U>(collection: { [key: string]: T }, callback: Mapper<T, U>, target?: typeof collection): { [key: string]: U };
299299
/** Maps an array or object properties using a callback function */
300300
export function map(collection: any, callback: any, target: typeof collection): any {
301301
target = target || (isArray(collection) ? [] : {});

0 commit comments

Comments
 (0)