Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generic functions #149

Open
Brendonovich opened this issue Sep 23, 2023 · 2 comments
Open

Support generic functions #149

Brendonovich opened this issue Sep 23, 2023 · 2 comments

Comments

@Brendonovich
Copy link
Collaborator

fn command(arg; tauri::AppHandle<impl tauri::Runtime>) no workey

@oscartbeaumont oscartbeaumont transferred this issue from oscartbeaumont/tauri-specta Sep 25, 2023
@oscartbeaumont oscartbeaumont changed the title Generic tauri runtimes produce error Support generic functions Sep 25, 2023
@oscartbeaumont
Copy link
Owner

Right now Specta requires all generics for a function to be hardcoded to a specific type when exporting but it would maybe be nice if that wasn't a requirement and it could end up in TS as generics. That being said how do Rust generic bounds translate into Typescript bounds is a really big question here.

@oscartbeaumont
Copy link
Owner

We also don't support impl Runtime or the like as an argument because we don't ever know the concrete type of the function so it can't be exported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants