mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 05:51:23 +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:
20
crates/typescript-tests/src/lib.rs
Normal file
20
crates/typescript-tests/src/lib.rs
Normal file
@ -0,0 +1,20 @@
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn greet(_: &str) {}
|
||||
|
||||
#[wasm_bindgen]
|
||||
struct A {
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
impl A {
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new() -> A {
|
||||
A {}
|
||||
}
|
||||
|
||||
pub fn other() {}
|
||||
|
||||
pub fn foo(&self) {}
|
||||
}
|
Reference in New Issue
Block a user