mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Fix EmberArray.uniqBy typing (#25073)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
16c3ba2628
commit
302ef7b926
Vendored
+1
-1
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user