diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index af33b66ac..327f001f9 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -9830,6 +9830,36 @@ module TestNoop { } } +// _.over +namespace TestOver { + { + let result: (...args: any[]) => number[]; + + result = _.over(Math.max); + result = _.over(Math.max, Math.min); + result = _.over([Math.max]); + result = _.over([Math.max], [Math.min]); + } + + { + let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => number[]>; + + result = _(Math.max).over(); + result = _(Math.max).over(Math.min); + result = _([Math.max]).over(); + result = _([Math.max]).over([Math.min]); + } + + { + let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => number[]>; + + result = _(Math.max).chain().over(); + result = _(Math.max).chain().over(Math.min); + result = _([Math.max]).chain().over(); + result = _([Math.max]).chain().over([Math.min]); + } +} + // _.property module TestProperty { interface SampleObject { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index f9249d16b..41f0f4aaa 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -16138,6 +16138,46 @@ declare module _ { noop(...args: any[]): _.LoDashExplicitWrapper; } + //_.over + interface LoDashStatic { + /** + * Creates a function that invokes iteratees with the arguments provided to the created function and returns + * their results. + * + * @param iteratees The iteratees to invoke. + * @return Returns the new function. + */ + over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + //_.property interface LoDashStatic { /**