Describe the bug
Using await analytics.track(...) (and page, identify, setEnabled) produces TS80007: 'await' has no effect on the type of this expression.
The Analytics interface in @wxt-dev/analytics declares all methods as returning void, even though the background implementation is async (returns Promise<void>). The frontend implementation returns void. Since Promise<void> is assignable to void, there's no implementation error — but users calling await analytics.track() see TS80007 because the declared return type is void.
Reproduction
- Create a WXT project with
@wxt-dev/analytics configured
- In any entrypoint (popup, options, content script, etc.), call
await analytics.track('my_event')
- Observe TS80007 in the editor or type checker
Steps to reproduce
- npm create wxt@latest -- wxt-analytics-test
- cd wxt-analytics-test
- npm i @wxt-dev/analytics
- Add analytics config to app.config.ts
- In an entrypoint: await analytics.track('test')
- npx tsc --noEmit
System Info
System:
OS: Linux 7.0 Arch Linux
CPU: (12) x64 Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz
Memory: 4.42 GB / 15.55 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 24.11.1 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/node
Yarn: 1.22.22 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/yarn
npm: 11.6.2 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/npm
pnpm: 10.25.0 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/pnpm
bun: 1.3.3 - /home/xanela/.bun/bin/bun
Deno: 2.8.0 - /usr/bin/deno
npmPackages:
@wxt-dev/analytics: ^0.5.4 => 0.5.4
wxt: ^0.20.26 => 0.20.26
Used Package Manager
pnpm
Validations
Describe the bug
Using
await analytics.track(...)(andpage,identify,setEnabled) produces TS80007:'await' has no effect on the type of this expression.The
Analyticsinterface in@wxt-dev/analyticsdeclares all methods as returningvoid, even though the background implementation isasync(returnsPromise<void>). The frontend implementation returnsvoid. SincePromise<void>is assignable tovoid, there's no implementation error — but users callingawait analytics.track()see TS80007 because the declared return type isvoid.Reproduction
@wxt-dev/analyticsconfiguredawait analytics.track('my_event')Steps to reproduce
System Info
System: OS: Linux 7.0 Arch Linux CPU: (12) x64 Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz Memory: 4.42 GB / 15.55 GB Container: Yes Shell: 5.9 - /usr/bin/zsh Binaries: Node: 24.11.1 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/node Yarn: 1.22.22 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/yarn npm: 11.6.2 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/npm pnpm: 10.25.0 - /home/xanela/.config/nvm/versions/node/v24.11.1/bin/pnpm bun: 1.3.3 - /home/xanela/.bun/bin/bun Deno: 2.8.0 - /usr/bin/deno npmPackages: @wxt-dev/analytics: ^0.5.4 => 0.5.4 wxt: ^0.20.26 => 0.20.26Used Package Manager
pnpm
Validations