mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-27 19:22:47 +00:00
6586 FIX lodash chain split
This commit is contained in:
parent
57ec5fbb76
commit
fdddacc2e8
@ -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 {
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user