diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 6f24b75dc..46c11ebf6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -565,6 +565,8 @@ result = _.sample([1, 2, 3, 4]); result = _.sample([1, 2, 3, 4], 2); result = _.shuffle([1, 2, 3, 4, 5, 6]); +result = <_.LoDashArrayWrapper>_([1, 2, 3]).shuffle(); +result = <_.LoDashArrayWrapper<_.Dictionary>>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).shuffle(); result = _.size([1, 2]); result = _.size({ 'one': 1, 'two': 2, 'three': 3 }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index c43f27c5c..426162e2e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -4398,6 +4398,20 @@ declare module _ { shuffle(collection: Dictionary): T[]; } + interface LoDashArrayWrapper { + /** + * @see _.shuffle + **/ + shuffle(): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.shuffle + **/ + shuffle(): LoDashArrayWrapper; + } + //_.size interface LoDashStatic { /**