diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index a41e663eb..2ebd0d1c6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -135,15 +135,11 @@ result = _('test').toString(); result = _([1, 2, 3]).toString(); result = _({ 'key1': 'test1', 'key2': 'test2' }).toString(); -result = _('test').valueOf(); -result = _([1, 2, 3]).valueOf(); -result = <_.Dictionary>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).valueOf(); - +// _.value (aliases: _.run, _.toJSON, _.valueOf) result = _('test').value(); -result = _([1, 2, 3]).value(); -result = <_.Dictionary>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).value(); - -result = <_.Dictionary>_({ a: 1, b: 2}).mapValues(function(num: number) { return num * 2; }).value(); +result = _([1, 2, 3]).run(); +result = <_.Dictionary>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).toJSON(); +result = <_.Dictionary>_({ a: 1, b: 2}).mapValues(function(num: number) { return num * 2; }).valueOf(); // /************* // * Arrays * diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index a7b2bec0d..29efdcdc7 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -177,15 +177,25 @@ declare module _ { toString(): string; /** - * Extracts the wrapped value. - * @return The wrapped value. - **/ - valueOf(): T; - - /** - * @see valueOf + * Executes the chained sequence to extract the unwrapped value. + * @return Returns the resolved unwrapped value. **/ value(): T; + + /** + * @see _.value + **/ + run(): T; + + /** + * @see _.value + **/ + toJSON(): T; + + /** + * @see _.value + **/ + valueOf(): T; } interface LoDashWrapper extends LoDashWrapperBase> { }