mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-30 17:04:20 +08:00
6586 FIX lodash chain split
This commit is contained in:
@@ -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 {
|
||||
{
|
||||
|
||||
21
lodash/lodash-3.10.d.ts
vendored
21
lodash/lodash-3.10.d.ts
vendored
@@ -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 {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user