Skip to content

Commit 5eebd2f

Browse files
authored
fix type declarations (#1917)
1 parent 1bbde87 commit 5eebd2f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

NOTICE

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ under the licensing terms detailed in LICENSE:
3939
* bnbarak <[email protected]>
4040
* Colin Eberhardt <[email protected]>
4141
* Ryan Pivovar <[email protected]>
42+
* Joe Pea <[email protected]>
4243

4344
Portions of this software are derived from third-party works licensed under
4445
the following terms:

std/assembly/index.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ declare namespace i8 {
278278
export const MAX_VALUE: i8;
279279
}
280280
/** Converts any other numeric value to a 16-bit signed integer. */
281-
declare function i16(value: any): i8;
281+
declare function i16(value: any): i16;
282282
declare namespace i16 {
283283
/** Smallest representable value. */
284284
export const MIN_VALUE: i16;
@@ -543,31 +543,31 @@ declare namespace i64 {
543543
/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */
544544
declare var isize: typeof i32 | typeof i64;
545545
/** Converts any other numeric value to an 8-bit unsigned integer. */
546-
declare function u8(value: any): i8;
546+
declare function u8(value: any): u8;
547547
declare namespace u8 {
548548
/** Smallest representable value. */
549549
export const MIN_VALUE: u8;
550550
/** Largest representable value. */
551551
export const MAX_VALUE: u8;
552552
}
553553
/** Converts any other numeric value to a 16-bit unsigned integer. */
554-
declare function u16(value: any): i8;
554+
declare function u16(value: any): u16;
555555
declare namespace u16 {
556556
/** Smallest representable value. */
557557
export const MIN_VALUE: u16;
558558
/** Largest representable value. */
559559
export const MAX_VALUE: u16;
560560
}
561561
/** Converts any other numeric value to a 32-bit unsigned integer. */
562-
declare function u32(value: any): i32;
562+
declare function u32(value: any): u32;
563563
declare namespace u32 {
564564
/** Smallest representable value. */
565565
export const MIN_VALUE: u32;
566566
/** Largest representable value. */
567567
export const MAX_VALUE: u32;
568568
}
569569
/** Converts any other numeric value to a 64-bit unsigned integer. */
570-
declare function u64(value: any): i64;
570+
declare function u64(value: any): u64;
571571
declare namespace u64 {
572572
/** Smallest representable value. */
573573
export const MIN_VALUE: u64;

0 commit comments

Comments
 (0)