Derive macros for the stdweb
crate
This crate currently defines a derive macro for stdweb
which allows you to define custom reference types outside
of stdweb
.
For example:
;
;
And then you can do:
// You can use `try_into` to cast a `Value` to your type.
let error: TypeError = js!.try_into.unwrap;
// You can also pass your type freely into the `js!` macro:
js!;