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.
const size = await api.window.appWindow.innerSize(); // { height: yyy, width: xxx}
size.toLogical(...); // <--- [Error] toLogical does not exist on 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.
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.