From 31d00a838b0a039bcd4e1a9ac8ed5279b5057747 Mon Sep 17 00:00:00 2001 From: Endel Dreyer Date: Tue, 11 Apr 2017 13:38:34 +0200 Subject: [PATCH] parseInt can also operate on numbers. `parseInt(3.5)` is a valid call on JavaScript and has a reasonable return value. --- lib/lib.es5.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index f0c6e9fb86116..7ae30f680b1ff 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -38,7 +38,7 @@ declare function eval(x: string): any; * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. * All other strings are considered decimal. */ -declare function parseInt(s: string, radix?: number): number; +declare function parseInt(s: string | number, radix?: number): number; /** * Converts a string to a floating-point number.