Merge pull request #23772 from chriskrycho/ember-fix-isEvery

Ember: `isEvery` has optional second arg.
This commit is contained in:
Benjamin Lichtman
2018-02-28 13:35:27 -08:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -1182,7 +1182,7 @@ declare module 'ember' {
* argument for all items in the enumerable. This method is often simpler/faster
* than using a callback.
*/
isEvery(key: string, value: any): boolean;
isEvery(key: string, value?: any): boolean;
/**
* Returns `true` if the passed function returns true for any item in the
* enumeration.

View File

@@ -130,6 +130,7 @@ const isHappy = (person: typeof Person3.prototype): boolean => {
};
people2.every(isHappy);
people2.any(isHappy);
people2.isEvery('isHappy');
people2.isEvery('isHappy', true);
people2.isAny('isHappy', 'true');
people2.isAny('isHappy');