Skip to content
New issue

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

start function of Stoppable doesn't receive arguments #2691

Closed
7 tasks done
wvffle opened this issue Jan 28, 2023 · 0 comments · Fixed by #2693
Closed
7 tasks done

start function of Stoppable doesn't receive arguments #2691

wvffle opened this issue Jan 28, 2023 · 0 comments · Fixed by #2693

Comments

@wvffle
Copy link
Contributor

wvffle commented Jan 28, 2023

Describe the bug

One can provide a function with arguments to useTimeoutFn and then use the arguments in the start function returned.

Everything works like a charm but typescript isn't happy with that at all due to Stoppable being typed wrongly. It complains that start function expects 0 arguments.

image

Also, as seen on the screenshot, user can't specify arguments' types as typescript complains about string not being compatible with unknown

Reproduction

https://stackblitz.com/edit/vitejs-vite-izdzrq/?file=src%2FApp.vue

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @vueuse/core: ^9.11.1 => 9.11.1 
    vue: ^3.2.25 => 3.2.45

Used Package Manager

npm

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant