Skip to content

Commit

Permalink
Add toString typings for Number and Boolean (AssemblyScript#769)
Browse files Browse the repository at this point in the history
This removes IDE errors when trying use the toString method on those primitive types.
  • Loading branch information
willemneal committed Aug 23, 2019
1 parent dc67549 commit 7bf26d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions std/assembly/index.d.ts
Expand Up @@ -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 {}

Expand Down

0 comments on commit 7bf26d5

Please sign in to comment.