We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pluck
1 parent 5446cc7 commit c9b8bb5Copy full SHA for c9b8bb5
src/common/common.ts
@@ -310,7 +310,7 @@ export function omit(obj: Obj) {
310
311
312
/** Given an array of objects, maps each element to a named property of the element. */
313
-export function pluck(collection: Obj[], propName: string): Obj[];
+export function pluck<T>(collection: Obj[], propName: string): T[];
314
/** Given an object, maps each property of the object to a named property of the property. */
315
export function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };
316
/**
0 commit comments