From c47abf42de08d69ecf21a277d6ff7d12298647d9 Mon Sep 17 00:00:00 2001 From: tari404 <2680383605@qq.com> Date: Sat, 30 Apr 2022 00:19:45 +0800 Subject: [PATCH 1/2] fix type declaration of Number --- std/assembly/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 5bb689f80f..a48442c0f8 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1425,7 +1425,6 @@ declare const F32: typeof _Float; declare const F64: typeof _Float; /** Alias of F64. */ declare const Number: typeof F64; -declare type Number = typeof F64; // User-defined diagnostic macros @@ -1955,6 +1954,11 @@ declare class SyntaxError extends Error { } /** Class for indicating an error when a global URI handling function was used in a wrong way. */ declare class URIError extends Error { } +interface Number { + /** Returns the respective basic value converted to a string. */ + toString(radix?: number): string; +} + interface Function { /** Function table index. */ readonly index: u32; From bad01af175a95926ac796dca394325ec4b848d01 Mon Sep 17 00:00:00 2001 From: tari404 <2680383605@qq.com> Date: Tue, 3 May 2022 22:03:41 +0800 Subject: [PATCH 2/2] change type declaration of Number --- std/assembly/index.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index a48442c0f8..e24d742684 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1425,6 +1425,7 @@ declare const F32: typeof _Float; declare const F64: typeof _Float; /** Alias of F64. */ declare const Number: typeof F64; +declare type Number = _Float; // User-defined diagnostic macros @@ -1954,11 +1955,6 @@ declare class SyntaxError extends Error { } /** Class for indicating an error when a global URI handling function was used in a wrong way. */ declare class URIError extends Error { } -interface Number { - /** Returns the respective basic value converted to a string. */ - toString(radix?: number): string; -} - interface Function { /** Function table index. */ readonly index: u32;