From 646f974a3dc62aa2647814ebe9384c1b06f9bd36 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Sat, 17 Aug 2019 16:24:21 -0400 Subject: [PATCH] Add toString methods to Number and Boolean This removes IDE errors when trying use the toString method on those primitive types. --- std/assembly/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 715a08d7a3..36384badb3 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1316,10 +1316,14 @@ declare class TypeError extends Error { } /** Class for indicating an error when trying to interpret syntactically invalid code. */ declare class SyntaxError extends Error { } -interface Boolean {} +interface Boolean { + toString(): string; +} interface Function {} interface IArguments {} -interface Number {} +interface Number { + toString(radix?: number): string; +} interface Object {} interface RegExp {}