You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when ever any tauri commands contains a input parameter has usize an empty binding.ts is generated. If the input parameter is i32 its works as fine as number data type is infered then.
#[specta::specta]#[tauri::command]pubasyncfnspectra_generate(indx:usize// it works for i32 !) -> Result<Vec<String>,String>{//some code}#[test]#[cfg_attr(mobile, tauri::mobile_entry_point)]fngenerate_arr(){let builder = Builder::<tauri::Wry>::new().commands(collect_commands![
spectra_generate,]);let _ = builder.export(
specta_typescript::Typescript::default(),"../src/bindings.ts",);}
//
specta-typescript = "0.0.7"
The text was updated successfully, but these errors were encountered:
I'd recommend adding .unwrap() after .export(), it's likely you'll see an error about how usize can't be properly exported to typescript as JS doesn't support 64 bit integers without BigInt. You can ignore the error with the bigint modifier on Typescript.
when ever any tauri commands contains a input parameter has
usize
an emptybinding.ts
is generated. If the input parameter isi32
its works as fine asnumber
data type is infered then.//
specta-typescript = "0.0.7"
The text was updated successfully, but these errors were encountered: