We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@tauri-apps/api
any
Everything in @tauri-apps/api is shown to have type any in vscode
run npx create-tauri-app, create a Svelte project with Typescript enabled
npx create-tauri-app
import something from @tauri-apps/api in App.svelte, like:
App.svelte
import { appWindow } from "@tauri-apps/api/window"; import { onMount } from "svelte"; onMount(() => { appWindow.listen("tauri://resize", ({ event, payload }) => { let t = appWindow.isMaximized(); }); });
Everything under appWindow will be shown as having any type by VSCode's intelisense. Svelte types will be shown correctly.
appWindow
The same can be seen in the non-svelte main.ts file
main.ts
I'm experiencing the same issue on a manually-configured project with different tools.
Intellisense should be able to display the correct types, unless I'm missing something.
Operating System - Windows, version 10.0.19044 X64 Webview2 - 99.0.1150.46 Visual Studio Build Tools: - Visual Studio Build Tools 2019 Node.js environment Node.js - 16.14.0 @tauri-apps/cli - 1.0.0-rc.6 (outdated, latest: 1.0.0-rc.7) @tauri-apps/api - 1.0.0-rc.2 Global packages npm - 8.3.1 pnpm - 6.32.3 yarn - Not installed Rust environment rustup - 1.24.3 rustc - 1.59.0 cargo - 1.59.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /.vscode /node_modules /public /src /src-tauri App tauri - 1.0.0-rc.4 (no lockfile) tauri-build - no manifest (no lockfile) tao - no manifest (no lockfile) wry - no manifest (no lockfile) build-type - bundle CSP - unset distDir - ../public devPath - http://localhost:8080/ framework - Svelte bundler - Rollup
The text was updated successfully, but these errors were encountered:
fix(api.js): appWindow shown as type any, fixes #3747
abc50f7
1deeb03
No branches or pull requests
Describe the bug
Everything in
@tauri-apps/api
is shown to have typeany
in vscodeReproduction
run
npx create-tauri-app
, create a Svelte project with Typescript enabledimport something from
@tauri-apps/api
inApp.svelte
, like:Everything under
appWindow
will be shown as havingany
type by VSCode's intelisense. Svelte types will be shown correctly.The same can be seen in the non-svelte
main.ts
fileI'm experiencing the same issue on a manually-configured project with different tools.
Expected behavior
Intellisense should be able to display the correct types, unless I'm missing something.
Platform and versions
Operating System - Windows, version 10.0.19044 X64 Webview2 - 99.0.1150.46 Visual Studio Build Tools: - Visual Studio Build Tools 2019 Node.js environment Node.js - 16.14.0 @tauri-apps/cli - 1.0.0-rc.6 (outdated, latest: 1.0.0-rc.7) @tauri-apps/api - 1.0.0-rc.2 Global packages npm - 8.3.1 pnpm - 6.32.3 yarn - Not installed Rust environment rustup - 1.24.3 rustc - 1.59.0 cargo - 1.59.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /.vscode /node_modules /public /src /src-tauri App tauri - 1.0.0-rc.4 (no lockfile) tauri-build - no manifest (no lockfile) tao - no manifest (no lockfile) wry - no manifest (no lockfile) build-type - bundle CSP - unset distDir - ../public devPath - http://localhost:8080/ framework - Svelte bundler - Rollup
The text was updated successfully, but these errors were encountered: