WIP, many aspects not yet implemented.
Import typescript definitions directly in your wasm rust app.
```typescript // src/index.ts
export function test(): void { console.log("test"); } ```
```rust // build.rs
use std::path::PathBuf;
use typescriptwasmbindgen::buildtypescriptwasm_binding;
fn main() { buildtypescriptwasmbinding(&PathBuf::from("./ts/testfunction.ts"), "test").unwrap(); } ```
```rust // lib.rs
use typescriptwasmbindgen::importtypescriptwasmbinding; use wasmbindgen::prelude::{wasm_bindgen, JsValue};
importtypescriptwasmbinding!("testfunction"); ```
```rust // wasm/src/lib.rs
use typescriptwasmbindgen::typescript; use wasmbindgen::prelude::wasmbindgen;
typescript!("../src/index.ts", "index");
// typescript!
macro expands like following:
//
// #[wasm_bindgen(module = "index")]
// extern "C" {
// fn test();
// }
```