1.0.4 - Fix `specta::specta` macro
Changes:
- Better serde optional handling - #69
- Fix
specta::specta
handling of functions withmut
arguments. - specta-rs/tauri-specta#24
Thanks @Brendonovich for his PR on better serde optional handling and @probablykasper for reporting the issue with handling of function args.
Important Note
Previously destructuring in function arguments would compile but as of this release, it will not.
#[derive(Type)]
pub struct Group {
name: String
}
// This will be a compile error now and would previously emit invalid Typescript.
#[command]
#[specta::specta]
pub async fn new_group(Group { name }: Group) {}
Due to the previous behavior previously causing invalid Typescript to be emitted, I don't view this as a breaking change. This will hopefully be properly fixed in a future update but it will likely require some breaking changes.