Skip to content

Commit 4a4cea5

Browse files
willemnealdcodeIO
authored andcommitted
Add toString typings for Number and Boolean (#769)
This removes IDE errors when trying use the toString method on those primitive types.
1 parent 37f27b1 commit 4a4cea5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

std/assembly/index.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,10 +1316,14 @@ declare class TypeError extends Error { }
13161316
/** Class for indicating an error when trying to interpret syntactically invalid code. */
13171317
declare class SyntaxError extends Error { }
13181318

1319-
interface Boolean {}
1319+
interface Boolean {
1320+
toString(): string;
1321+
}
13201322
interface Function {}
13211323
interface IArguments {}
1322-
interface Number {}
1324+
interface Number {
1325+
toString(radix?: number): string;
1326+
}
13231327
interface Object {}
13241328
interface RegExp {}
13251329

0 commit comments

Comments
 (0)