mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-25 08:06:22 +08:00
Merge pull request #23772 from chriskrycho/ember-fix-isEvery
Ember: `isEvery` has optional second arg.
This commit is contained in:
2
types/ember/index.d.ts
vendored
2
types/ember/index.d.ts
vendored
@@ -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.
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user