diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index c7e6bf024..0c73066c5 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -363,14 +363,19 @@ result = _.at(['moe', 'larry', 'curly'], 0, 2); result = _.contains([1, 2, 3], 1); result = _.contains([1, 2, 3], 1, 2); -result = _.contains({ 'name': 'moe', 'age': 40 }, 'moe'); +result = _.contains({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); result = _.contains('curly', 'ur'); result = _.include([1, 2, 3], 1); result = _.include([1, 2, 3], 1, 2); -result = _.include({ 'name': 'moe', 'age': 40 }, 'moe'); +result = _.include({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); result = _.include('curly', 'ur'); +result = _.includes([1, 2, 3], 1); +result = _.includes([1, 2, 3], 1, 2); +result = _.includes({ 'moe': 30, 'larry': 40, 'curly': 67 }, 40); +result = _.includes('curly', 'ur'); + result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return Math.floor(num); }); result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return this.floor(num); }, Math); result = <_.Dictionary>_.countBy(['one', 'two', 'three'], 'length'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 3723f497d..8376f9741 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2198,11 +2198,11 @@ declare module _ { /** * @see _.contains * @param dictionary The dictionary to iterate over. - * @param key The key in the dictionary to search for. + * @param value The value in the dictionary to search for. **/ contains( dictionary: Dictionary, - key: string, + value: T, fromIndex?: number): boolean; /** @@ -2236,7 +2236,7 @@ declare module _ { **/ include( dictionary: Dictionary, - key: string, + value: T, fromIndex?: number): boolean; /** @@ -2246,6 +2246,38 @@ declare module _ { searchString: string, targetString: string, fromIndex?: number): boolean; + + /** + * @see _.contains + **/ + includes( + collection: Array, + target: T, + fromIndex?: number): boolean; + + /** + * @see _.contains + **/ + includes( + collection: List, + target: T, + fromIndex?: number): boolean; + + /** + * @see _.contains + **/ + includes( + dictionary: Dictionary, + value: T, + fromIndex?: number): boolean; + + /** + * @see _.contains + **/ + includes( + searchString: string, + targetString: string, + fromIndex?: number): boolean; } //_.countBy diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 85d473f28..1bb6be593 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -2703,7 +2703,6 @@ declare module "sequelize" } interface Lodash extends _.LoDashStatic { - includes(str: string, needle: string): boolean; camelizeIf(str: string, condition: boolean): string; camelizeIf(str: string, condition: any): string; underscoredIf(str: string, condition: boolean): string; @@ -2785,4 +2784,4 @@ declare module "sequelize" var sequelize: sequelize.SequelizeStatic; export = sequelize; -} \ No newline at end of file +}