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
Currently working on an app using Tauri and Angular, I noticed that I get TypeScript compilation errors when using the latest version of Tauri. This doesn't happen when using @tauri-apps/api@1.0.0-beta.4.
To Reproduce
Create a new Angular project, then use tauri init.
Once that's done, use @tauri-apps/api in your project, then try compiling it.
I've only tested this issue using Angular, but someone on Discord said they encountered the same issue using Vue and TypeScript, so this doesn't seem to be Angular related.
While waiting for the next release, I fixed it locally for me by moving the two lines with // @ts-expect-error one line down, so that the end result looks like:
/** * Get an instance of `WebviewWindow` for the current webview window. * * @return The current WebviewWindow. */functiongetCurrent(): WebviewWindow{returnnewWebviewWindow(window.__TAURI__.__currentWindow.label,{// @ts-expect-errorskip: true})}/** * Gets an instance of `WebviewWindow` for all available webview windows. * * @return The list of WebviewWindow. */functiongetAll(): WebviewWindow[]{returnwindow.__TAURI__.__windows.map(// @ts-expect-error(w)=>newWebviewWindow(w,{skip: true}))}
Describe the bug
Currently working on an app using Tauri and Angular, I noticed that I get TypeScript compilation errors when using the latest version of Tauri. This doesn't happen when using
@tauri-apps/api@1.0.0-beta.4
.To Reproduce
Create a new Angular project, then use
tauri init
.Once that's done, use
@tauri-apps/api
in your project, then try compiling it.I've only tested this issue using Angular, but someone on Discord said they encountered the same issue using Vue and TypeScript, so this doesn't seem to be Angular related.
Expected behavior
No compilation errors.
Screenshots
Platform and Versions (required):
The text was updated successfully, but these errors were encountered: