mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 13:52:46 -07:00
feat: add automatic types generation (#703)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user