feat: add automatic types generation (#703)

This commit is contained in:
Valerio Ageno
2025-04-20 11:04:48 +02:00
committed by GitHub
parent 0813c14e15
commit bc444929ed
26 changed files with 1246 additions and 59 deletions
+10
View File
@@ -19,3 +19,13 @@ pub fn handler(args: TokenStream, item: TokenStream) -> TokenStream {
pub fn api(args: TokenStream, item: TokenStream) -> TokenStream {
api::api_core(args, item)
}
/// Automatically generate typescript's types
/// from Rust's structs, types and enums.
///
/// The types will be exported on the client side
/// and it will be available from the `"tuono/types"` module.
#[proc_macro_derive(Type)]
pub fn derive_typescript_type(_: TokenStream) -> TokenStream {
TokenStream::new()
}