From b4d8e49d5618d26308769630cfcdbb271b007bd2 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Wed, 2 Sep 2015 02:14:27 +0500 Subject: [PATCH] lodash: changed _.uniqueId() method --- lodash/lodash-tests.ts | 8 +++++--- lodash/lodash.d.ts | 15 +++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 7bdd7a8621..bebc733103 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1735,9 +1735,6 @@ class Mage { } } -result = _.uniqueId('contact_'); -result = _.uniqueId(); - /********* * String *********/ @@ -1940,6 +1937,11 @@ result = (_.methodOf(TestMethodOfObject, 1, 2))(['a', '0']); result = (_(TestMethodOfObject).methodOf(1, 2).value())('a[0]'); result = (_(TestMethodOfObject).methodOf(1, 2).value())(['a', '0']); +// _.uniqueId +result = _.uniqueId(); +result = _.uniqueId(''); +result = _('').uniqueId(); + result = _.VERSION; result = <_.Support>_.support; result = <_.TemplateSettings>_.templateSettings; diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5c192d5c36..2d699038ac 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -8338,13 +8338,20 @@ declare module _ { //_.uniqueId interface LoDashStatic { /** - * Generates a unique ID. If prefix is provided the ID will be appended to it. - * @param prefix The value to prefix the ID with. - * @return Returns the unique ID. - **/ + * Generates a unique ID. If prefix is provided the ID is appended to it. + * @param prefix The value to prefix the ID with. + * @return Returns the unique ID. + */ uniqueId(prefix?: string): string; } + interface LoDashWrapper { + /** + * @see _.uniqueId + */ + uniqueId(): string; + } + //_.constant interface LoDashStatic { /**