ts-function 0.2.0

A proc-macro that generates TypeScript type aliases and wasm-bindgen ABI trait impls for Rust callback wrapper structs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
let state = {
    val: null,
};

export function set_cb_val(val) {
    state.val = val;
}
export function get_cb() {
    return (val) => {
        state.val = val;
    };
}
export function get_cb_state() { return state.val; }