diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index f12ca23c4..ad2244e6e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -245,17 +245,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 141ad993c..7db977f66 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -387,7 +387,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