File tree Expand file tree Collapse file tree 4 files changed +29
-3
lines changed
tests/specs/run/wasm_module/table_global_memory Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "args" : " run --check main.js" ,
3
- "output" : " main.out"
2
+ "tests" : {
3
+ "run" : {
4
+ "args" : " run main.js" ,
5
+ "output" : " main.out"
6
+ },
7
+ "check" : {
8
+ "args" : " check check.ts" ,
9
+ "output" : " check.out" ,
10
+ "exitCode" : 1
11
+ }
12
+ }
4
13
}
Original file line number Diff line number Diff line change
1
+ Check file:///[WILDLINE]/check.ts
2
+ error: TS2322 [ERROR]: Type 'Function | null' is not assignable to type 'number'.
3
+ Type 'null' is not assignable to type 'number'.
4
+ const value1: number = table.get(0);
5
+ ~~~~~~
6
+ at file:///[WILDLINE]/check.ts:2:7
7
+
8
+ TS2322 [ERROR]: Type 'ArrayBuffer | SharedArrayBuffer' is not assignable to type 'number'.
9
+ Type 'ArrayBuffer' is not assignable to type 'number'.
10
+ const value2: number = memory.buffer;
11
+ ~~~~~~
12
+ at file:///[WILDLINE]/check.ts:3:7
13
+
14
+ Found 2 errors.
Original file line number Diff line number Diff line change
1
+ import { memory , table } from "./mod.wasm" ;
2
+ const value1 : number = table . get ( 0 ) ;
3
+ const value2 : number = memory . buffer ;
4
+ console . log ( value1 , value2 ) ;
Original file line number Diff line number Diff line change 1
- Check [WILDCARD]
2
1
[Module: null prototype] {
3
2
func: [Function: 0],
4
3
global: Global [WebAssembly.Global] {},
You can’t perform that action at this time.
0 commit comments