diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3c295b8ef..2e7e31bbd 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1003,12 +1003,28 @@ module TestRemove { module TestRest { let array: TResult[]; let list: _.List; - let result: TResult[]; - result = _.rest(array); - result = _.rest(list); - result = _(array).rest().value(); - result = _(list).rest().value(); + { + let result: TResult[]; + + result = _.rest(array); + result = _.rest(list); + + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).rest(); + result = _(list).rest(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().rest(); + result = _(list).chain().rest(); + } } // _.slice @@ -1074,12 +1090,28 @@ module TestSortedLastIndex { module TestTail { let array: TResult[]; let list: _.List; - let result: TResult[]; - result = _.tail(array); - result = _.tail(list); - result = _(array).tail().value(); - result = _(list).tail().value(); + { + let result: TResult[]; + + result = _.tail(array); + result = _.tail(list); + + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(array).tail(); + result = _(list).tail(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(array).chain().tail(); + result = _(list).chain().tail(); + } } // _.take diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 0a7966eae..43c1a6862 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1711,7 +1711,21 @@ declare module _ { /** * @see _.rest */ - rest(): LoDashImplicitArrayWrapper; + rest(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.rest + */ + rest(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + rest(): LoDashExplicitArrayWrapper; } //_.slice @@ -1910,7 +1924,21 @@ declare module _ { /** * @see _.rest */ - tail(): LoDashImplicitArrayWrapper; + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; } //_.take