Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/ember/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ declare module 'ember' {
* Returns a new enumerable that contains only items containing a unique property value.
* The default implementation returns an array regardless of the receiver type.
*/
uniqBy(): NativeArray<T>;
uniqBy(property: string): NativeArray<T>;
/**
* Returns `true` if the passed object can be found in the enumerable.
*/
Expand Down
3 changes: 3 additions & 0 deletions types/ember/test/array-ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ assertType<number>(array.get('length'));
assertType<Person | undefined>(array.get('firstObject'));
assertType<string[]>(array.mapBy('name'));
assertType<string[]>(array.map(p => p.get('name')));
assertType<Person[]>(array.sortBy('name'));
assertType<Person[]>(array.uniq());
assertType<Person[]>(array.uniqBy('name'));