diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3afc49041..15cb98e22 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -216,15 +216,37 @@ module TestCompact { module TestDropRight { let array: TResult[]; let list: _.List; - let result: TResult[]; - result = _.dropRight(array); - result = _.dropRight(array, 42); - result = _.dropRight(list); - result = _.dropRight(list, 42); - result = _(array).dropRight().value(); - result = _(array).dropRight(42).value(); - result = _(list).dropRight().value(); - result = _(list).dropRight(42).value(); + + { + let result: TResult[]; + + result = _.dropRight(array); + result = _.dropRight(array, 42); + + result = _.dropRight(list); + result = _.dropRight(list, 42); + + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).dropRight(); + result = _(array).dropRight(42); + + result = _(list).dropRight(); + result = _(list).dropRight(42); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().dropRight(); + result = _(array).chain().dropRight(42); + + result = _(list).chain().dropRight(); + result = _(list).chain().dropRight(42); + } } // _.dropRightWhile diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index d143f4e65..f37a1b657 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -391,6 +391,20 @@ declare module _ { dropRight(n?: number): LoDashImplicitArrayWrapper; } + interface LoDashExplicitArrayWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + //_.dropRightWhile interface LoDashStatic { /**