diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 16a0ea50e..982868579 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -744,12 +744,28 @@ module TestIntersection { module TestLast { let array: TResult[]; let list: _.List; - let result: TResult; - result = _.last(array); - result = _.last(list); - result = _(array).last(); - result = _(list).last(); + { + let result: TResult; + + result = _.last(array); + result = _.last(list); + + result = _(array).last(); + result = _(list).last(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().last(); + } + + { + let result: _.LoDashExplicitObjectWrapper<_.List>; + + result = _(list).chain().last<_.List>(); + } } // _.lastIndexOf diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e75cfdedc..f40113f7e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1326,6 +1326,20 @@ declare module _ { last(): T; } + interface LoDashExplicitArrayWrapper { + /** + * @see _.last + */ + last(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.last + */ + last(): LoDashExplicitObjectWrapper; + } + //_.lastIndexOf interface LoDashStatic { /**