Skip to content

Commit 1deeb03

Browse files
fix(api.js): appWindow shown as type any, fixes #3747 (#3772)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent 266156a commit 1deeb03

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changes/appwindow-type-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"api": patch
3+
---
4+
5+
Properly define the `appWindow` type.

tooling/api/rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export default [
5353
}),
5454
babel({
5555
configFile: false,
56-
presets: [['@babel/preset-env'], ['@babel/preset-typescript']]
56+
presets: [['@babel/preset-env'], ['@babel/preset-typescript']],
57+
babelHelpers: 'bundled'
5758
}),
5859
terser()
5960
],

tooling/api/src/window.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ class WebviewWindow extends WindowManager {
11681168
}
11691169

11701170
/** The WebviewWindow for the current window. */
1171-
let appWindow
1171+
let appWindow: WebviewWindow
11721172
if ('__TAURI_METADATA__' in window) {
11731173
appWindow = new WebviewWindow(
11741174
window.__TAURI_METADATA__.__currentWindow.label,

0 commit comments

Comments
 (0)