diff --git a/lodash/lodash-3.10-tests.ts b/lodash/lodash-3.10-tests.ts index 2616822f6e..3eeff29221 100644 --- a/lodash/lodash-3.10-tests.ts +++ b/lodash/lodash-3.10-tests.ts @@ -9658,6 +9658,25 @@ namespace TestSnakeCase { } } +// _.split +namespace TestSplit { + { + let result: _.LoDashImplicitArrayWrapper; + + result = _('a-b-c').split(); + result = _('a-b-c').split('-'); + result = _('a-b-c').split('-', 2); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _('a-b-c').chain().split(); + result = _('a-b-c').chain().split('-'); + result = _('a-b-c').chain().split('-', 2); + } +} + // _.startCase namespace TestStartCase { { diff --git a/lodash/lodash-3.10.d.ts b/lodash/lodash-3.10.d.ts index aea06a8362..a63d92d0f0 100644 --- a/lodash/lodash-3.10.d.ts +++ b/lodash/lodash-3.10.d.ts @@ -14720,6 +14720,27 @@ declare module _ { snakeCase(): LoDashExplicitWrapper; } + //_.split + interface LoDashImplicitWrapper { + /** + * 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; + } + + interface LoDashExplicitWrapper { + /** + * @see _.split + */ + split(separator?: RegExp|string, limit?: number): LoDashImplicitArrayWrapper; + } + //_.startCase interface LoDashStatic { /**