diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3afc49041b..470ffa7003 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3879,10 +3879,24 @@ module TestPadRight { // _.parseInt -result = _.parseInt('08'); -result = _.parseInt('08', 10); -result = _('08').parseInt(); -result = _('08').parseInt(10); +module TestParseInt { + { + let result: number; + + result = _.parseInt('08'); + result = _.parseInt('08', 10); + + result = _('08').parseInt(); + result = _('08').parseInt(10); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('08').chain().parseInt(); + result = _('08').chain().parseInt(10); + } +} // _.repeat module TestRepeat { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index d143f4e657..158a732a61 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9392,12 +9392,17 @@ declare module _ { /** * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used * unless value is a hexadecimal, in which case a radix of 16 is used. + * * Note: This method aligns with the ES5 implementation of parseInt. + * * @param string The string to convert. * @param radix The radix to interpret value by. * @return Returns the converted integer. */ - parseInt(string: string, radix?: number): number; + parseInt( + string: string, + radix?: number + ): number; } interface LoDashImplicitWrapper { @@ -9407,6 +9412,13 @@ declare module _ { parseInt(radix?: number): number; } + interface LoDashExplicitWrapper { + /** + * @see _.parseInt + */ + parseInt(radix?: number): LoDashExplicitWrapper; + } + //_.repeat interface LoDashStatic { /**