diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3551515fc..eaacbe460 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -260,17 +260,37 @@ module TestDifference { // _.drop { - let testDropArray: TResult[]; - let testDropList: _.List; - let result: TResult[]; - result = _.drop(testDropArray); - result = _.drop(testDropArray, 42); - result = _.drop(testDropList); - result = _.drop(testDropList, 42); - result = _(testDropArray).drop().value(); - result = _(testDropArray).drop(42).value(); - result = _(testDropList).drop().value(); - result = _(testDropList).drop(42).value(); + let array: TResult[]; + let list: _.List; + + { + let result: TResult[]; + result = _.drop(array); + result = _.drop(array, 42); + + result = _.drop(list); + result = _.drop(list, 42); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).drop(); + result = _(array).drop(42); + + result = _(list).drop(); + result = _(list).drop(42); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().drop(); + result = _(array).chain().drop(42); + + result = _(list).chain().drop(); + result = _(list).chain().drop(42); + } } // _.dropRight diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index b3edd5215..48b669552 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -401,7 +401,21 @@ declare module _ { /** * @see _.drop */ - drop(n?: number): LoDashImplicitArrayWrapper; + drop(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; } //_.dropRight