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 {
13491349/** Macro type evaluating to the underlying native WebAssembly type. */
13501350declare type native < T > = T ;
13511351/** 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 ;
13531353/** 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 ] ;
13551355/** A special type evaluated to the return type of T if T is a callable function. */
13561356declare type ReturnType < T extends ( ...args : any ) => any > = T extends ( ...args : any ) => infer R ? R : any ;
13571357/** 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 7373 drop
7474 i32.const 1
7575 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
7693 i32.const 1
7794 drop
7895 i32.const 1
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ assert(sizeof<indexof<Float32Array>>() == 4); // i32
3939assert ( isInteger < valueof < Uint8ClampedArray > > ( ) ) ;
4040assert ( ! isSigned < valueof < Uint8ClampedArray > > ( ) ) ;
4141assert ( 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 ) ;
4248
4349// map indexes
4450assert ( isInteger < indexof < Map < i32 , i32 > > > ( ) ) ;
You can’t perform that action at this time.
0 commit comments