6586 FIX lodash chain split

This commit is contained in:
recuedav 2016-08-19 13:54:14 +02:00
parent 57ec5fbb76
commit fdddacc2e8
2 changed files with 40 additions and 0 deletions

View File

@ -9658,6 +9658,25 @@ namespace TestSnakeCase {
}
}
// _.split
namespace TestSplit {
{
let result: _.LoDashImplicitArrayWrapper<string>;
result = _('a-b-c').split();
result = _('a-b-c').split('-');
result = _('a-b-c').split('-', 2);
}
{
let result: _.LoDashImplicitArrayWrapper<string>;
result = _('a-b-c').chain().split();
result = _('a-b-c').chain().split('-');
result = _('a-b-c').chain().split('-', 2);
}
}
// _.startCase
namespace TestStartCase {
{

View File

@ -14720,6 +14720,27 @@ declare module _ {
snakeCase(): LoDashExplicitWrapper<string>;
}
//_.split
interface LoDashImplicitWrapper<T> {
/**
* Splits string by separator.
*
* Note: This method is based on String#split.
*
* @param separator The separator pattern to split by.
* @param limit The length to truncate results to.
* @return Returns the new array with the terms splitted.
*/
split(separator?: RegExp|string, limit?: number): LoDashImplicitArrayWrapper<string>;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.split
*/
split(separator?: RegExp|string, limit?: number): LoDashImplicitArrayWrapper<string>;
}
//_.startCase
interface LoDashStatic {
/**