Fix EmberArray.uniqBy typing (#25073)

This commit is contained in:
Abram Booth
2018-04-17 18:11:52 -07:00
committed by Ryan Cavanaugh
parent 16c3ba2628
commit 302ef7b926
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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.
*/
+3
View File
@@ -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'));