fix: global API script should reuse window.__TAURI__ types (#3602)

currently each script inlines what it needs from @tauri-apps/api, so type checks like `image instanceof Image` all fail
This commit is contained in:
Lucas Fernandes Nogueira
2026-09-22 06:04:28 -03:00
committed by GitHub
parent 5baf71a472
commit ae3c808eb6
29 changed files with 98 additions and 28 deletions
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_AUTOSTART__=function(n){"use strict";async function t(n,t={},a){return window.__TAURI_INTERNALS__.invoke(n,t,a)}return"function"==typeof SuppressedError&&SuppressedError,n.disable=async function(){await t("plugin:autostart|disable")},n.enable=async function(){await t("plugin:autostart|enable")},n.isEnabled=async function(){return await t("plugin:autostart|is_enabled")},n}({});Object.defineProperty(window.__TAURI__,"autostart",{value:__TAURI_PLUGIN_AUTOSTART__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_AUTOSTART__=function(n,a){"use strict";return n.disable=async function(){await a.invoke("plugin:autostart|disable")},n.enable=async function(){await a.invoke("plugin:autostart|enable")},n.isEnabled=async function(){return await a.invoke("plugin:autostart|is_enabled")},n}({},window.__TAURI__.core);Object.defineProperty(window.__TAURI__,"autostart",{value:__TAURI_PLUGIN_AUTOSTART__})}