From dcba5c74f315cbd2898e2f4fb4072b408f7440ff Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 20 Oct 2013 18:29:07 -0400 Subject: [PATCH] added _.parseInt definition --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 102baa189..4578b1a5c 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -724,6 +724,8 @@ _.mixin({ var lodash = _.noConflict(); +result = _.parseInt('08'); + ////////////////////////////////////////////////////////////////////////////////////////////////// var iceCream = { flavor: "chocolate" }; diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 7897d283b..68c4ff5e8 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2733,6 +2733,18 @@ declare module _ { **/ export function noConflict(): typeof _; + /** + * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a + * radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used. + * + * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See + * http://es5.github.io/#E. + * @param value The value to parse. + * @param radix The radix used to interpret the value to parse. + * @return The new integer value. + **/ + export function parseInt(value: string): number; +