Skip to content

1.0.4 - Fix `specta::specta` macro

Compare
Choose a tag to compare
@oscartbeaumont oscartbeaumont released this 11 May 04:20
· 205 commits to main since this release

Changes:

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.