deno_bindgen
deno_bindgen copied to clipboard
Conditional field attributes do not work
use deno_bindgen::deno_bindgen;
#[deno_bindgen]
pub struct UsbDevice {
// Not supposed to be serialized or included in typings.
#[cfg(not(feature = "deno_ffi"))]
non_serializable_handle: Device,
}
Output:
type UsbDevice = {
non_serializable_handle: Device, // <-- should not be included
};
Expected output:
type UsbDevice = {};