Merge pull request #2586 from bomiller/underscore-chain-first

Underscore.js: Fix for chained calls to first()
This commit is contained in:
Masahiro Wakame
2014-07-30 20:16:02 +09:00
2 changed files with 5 additions and 1 deletions

View File

@@ -328,4 +328,8 @@ function chain_tests() {
.flatten()
.find(num => num % 2 == 0)
.value();
var firstVal: number = _.chain([1, 2, 3])
.first()
.value();
}

View File

@@ -2620,7 +2620,7 @@ interface _Chain<T> {
* Wrapped type `any[]`.
* @see _.first
**/
first(): _Chain<T>;
first(): _ChainSingle<T>;
/**
* Wrapped type `any[]`.