diff --git a/types/underscore/index.d.ts b/types/underscore/index.d.ts index 856bf8e0fa..eb8fdb57e0 100644 --- a/types/underscore/index.d.ts +++ b/types/underscore/index.d.ts @@ -5689,7 +5689,7 @@ declare module _ { * Wrapped type `object`. * @see _.pairs **/ - pairs(): _Chain; + pairs(): _Chain; /** * Wrapped type `object`. diff --git a/types/underscore/underscore-tests.ts b/types/underscore/underscore-tests.ts index 9953540fa8..11dcf477a0 100644 --- a/types/underscore/underscore-tests.ts +++ b/types/underscore/underscore-tests.ts @@ -520,6 +520,11 @@ function chain_tests() { .groupBy('property') .mapObject((objects: any) => _.pluck(objects, 'value')) .value(); // { odd: [1], even: [0, 2] } + + var matrixOfString : string[][] = _.chain({'foo' : '1', 'bar': '1'}) + .keys() // return ['foo', 'bar'] : string[] + .pairs() // return [['foo', '0'], ['bar', '1']] : string[][] + .value(); } var obj: { [k: string] : number } = {