Skip to content

Commit c9b8bb5

Browse files
chore(common): Add generic type to pluck
1 parent 5446cc7 commit c9b8bb5

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
@@ -310,7 +310,7 @@ export function omit(obj: Obj) {
310310

311311

312312
/** Given an array of objects, maps each element to a named property of the element. */
313-
export function pluck(collection: Obj[], propName: string): Obj[];
313+
export function pluck<T>(collection: Obj[], propName: string): T[];
314314
/** Given an object, maps each property of the object to a named property of the property. */
315315
export function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };
316316
/**

0 commit comments

Comments
 (0)