-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
good first issueGood for newcomersGood for newcomersscope: api.jsThe @tauri-apps/api npm packageThe @tauri-apps/api npm packagetype: bug
Description
Describe the bug
Everything in @tauri-apps/api is shown to have type any in vscode
Reproduction
-
run
npx create-tauri-app, create a Svelte project with Typescript enabled -
import something from
@tauri-apps/apiinApp.svelte, like:import { appWindow } from "@tauri-apps/api/window"; import { onMount } from "svelte"; onMount(() => { appWindow.listen("tauri://resize", ({ event, payload }) => { let t = appWindow.isMaximized(); }); });
Everything under
appWindowwill be shown as havinganytype by VSCode's intelisense. Svelte types will be shown correctly.The same can be seen in the non-svelte
main.tsfile
I'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 - RollupReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersscope: api.jsThe @tauri-apps/api npm packageThe @tauri-apps/api npm packagetype: bug