added _.parseInt definition

This commit is contained in:
Brian Zengel
2013-10-20 18:29:07 -04:00
parent c27e60d3fc
commit dcba5c74f3
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -724,6 +724,8 @@ _.mixin({
var lodash = <typeof _>_.noConflict();
result = <number>_.parseInt('08');
//////////////////////////////////////////////////////////////////////////////////////////////////
var iceCream = { flavor: "chocolate" };
+12
View File
@@ -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;