File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -1349,9 +1349,9 @@ declare abstract class i31 {
1349
1349
/** Macro type evaluating to the underlying native WebAssembly type. */
1350
1350
declare type native < T > = T ;
1351
1351
/** Special type evaluating the indexed access index type. */
1352
- declare type indexof < T extends unknown [ ] > = keyof T ;
1352
+ declare type indexof < T extends ArrayLike < unknown > > = keyof T ;
1353
1353
/** Special type evaluating the indexed access value type. */
1354
- declare type valueof < T extends unknown [ ] > = T [ 0 ] ;
1354
+ declare type valueof < T extends ArrayLike < unknown > > = T [ 0 ] ;
1355
1355
/** A special type evaluated to the return type of T if T is a callable function. */
1356
1356
declare type ReturnType < T extends ( ...args : any ) => any > = T extends ( ...args : any ) => infer R ? R : any ;
1357
1357
/** A special type evaluated to the return type of T if T is a callable function. */
Original file line number Diff line number Diff line change 73
73
drop
74
74
i32.const 1
75
75
drop
76
+ i32.const 0
77
+ i32.eqz
78
+ drop
79
+ i32.const 4
80
+ i32.const 4
81
+ i32.eq
82
+ drop
83
+ i32.const 1
84
+ drop
85
+ i32.const 1
86
+ drop
87
+ i32.const 8
88
+ i32.const 8
89
+ i32.eq
90
+ drop
91
+ i32.const 1
92
+ drop
76
93
i32.const 1
77
94
drop
78
95
i32.const 1
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ assert(sizeof<indexof<Float32Array>>() == 4); // i32
39
39
assert ( isInteger < valueof < Uint8ClampedArray > > ( ) ) ;
40
40
assert ( ! isSigned < valueof < Uint8ClampedArray > > ( ) ) ;
41
41
assert ( sizeof < valueof < Uint8ClampedArray > > ( ) == 1 ) ;
42
+ assert ( isFloat < valueof < Float32Array > > ( ) ) ;
43
+ assert ( ! isInteger < valueof < Float32Array > > ( ) ) ;
44
+ assert ( sizeof < valueof < Float32Array > > ( ) == 4 ) ;
45
+ assert ( isInteger < valueof < Int64Array > > ( ) ) ;
46
+ assert ( isSigned < valueof < Int64Array > > ( ) ) ;
47
+ assert ( sizeof < valueof < Int64Array > > ( ) == 8 ) ;
42
48
43
49
// map indexes
44
50
assert ( isInteger < indexof < Map < i32 , i32 > > > ( ) ) ;
You can’t perform that action at this time.
0 commit comments