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
Javascript API types incorrect when reading physical size #2599
Comments
|
The actual type returned by |
if typescript thinks the object is Tauri's backend and Rust has no role in this as |
No, the problem is, the function is defined as |
The return type is wrong in the javascript function. You can either make the javascript create a new instance of a PhysicalSize and return this. Or change the return type. |
Ah yes, I see the problem now, we are indeed just returning a plain object instead of an instance of a class. Should've read your words more carefully, apologies. |
If there isn't anyone already working on it, I'll give it a shot as my first contribution |
It's all yours! Do not hesitate if you have any questions! You can reach us on discord as well. |
…ize and PhysiscalPosition fix tauri-apps#2599
…ize and PhysiscalPosition fix tauri-apps#2599
…ize and PhysiscalPosition fix tauri-apps#2599
When using the Tauri API in typescript, the intellisense is not correct, (and therefore the typescript declarations are wrong?) Specifically the API I notice this issue is when reading the physical size.
My guess is that when sending the rust props over to javascript, the prototypes or methods are lost and only the values are passed. However the typescript typings are assuming you have a constructed object.
The text was updated successfully, but these errors were encountered: