mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 06:51:24 +00:00
Start testing TypeScript output on CI
This commit starts to add some simple tests for our TypeScript output of the wasm-bindgen CLI, currently just running `tsc` to make sure syntax looks good and types are emitted as expected. This'll hopefully be able to get expanded over time with bug reports as they come in as well as ensure that we don't regress anything in egregious manners! Closes #922
This commit is contained in:
11
crates/typescript-tests/index.ts
Normal file
11
crates/typescript-tests/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import * as wbg from './pkg/typescript_tests';
|
||||
import * as wasm from './pkg/typescript_tests_bg';
|
||||
|
||||
const a1: (a: string) => void = wbg.greet;
|
||||
const a2: (a: number, b: number) => void = wasm.greet;
|
||||
const a3: WebAssembly.Memory = wasm.memory;
|
||||
|
||||
const c = new wbg.A();
|
||||
wbg.A.other();
|
||||
c.foo();
|
||||
c.free();
|
Reference in New Issue
Block a user