Typecheck token implicitly has 'any' type
dnlsndr opened this issue ยท comments
๐ The bug
Nuxi 3.0.0 08:26:48
โน Using default Tailwind CSS file from runtime/tailwind.css nuxt:tailwindcss 08:26:49
node_modules/@nuxtjs/turnstile/dist/runtime/components/Turnstile.vue:45:15 - error TS7006: Parameter 'token' implicitly has an 'any' type.
45 callback: token => emit('update:modelValue', token),
~~~~~
Found 1 error in node_modules/@nuxtjs/turnstile/dist/runtime/components/Turnstile.vue:45
ERROR Command failed with exit code 2: npx -p vue-tsc -p typescript vue-tsc --noEmit 08:26:56
at makeError (node_modules/nuxi/dist/shared/nuxi.6b390535.mjs:619:11)
at handlePromise (node_modules/nuxi/dist/shared/nuxi.6b390535.mjs:1026:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.invoke (node_modules/nuxi/dist/chunks/typecheck.mjs:46:7)
at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
The token within the component seems to not be typed correctly, which throws an error when you want to typecheck a nuxt3 project. The eslint configuration is the default configuration generated in the .nuxt
folder, which in terms also includes all used libraries in the typecheck.
๐ ๏ธ To reproduce
https://stackblitz.com/edit/github-7yqadg-vsed7m?file=package.json
๐ Expected behaviour
A typecheck should not fail upon analyzing the Turnstile.vue
file.
โน๏ธ Additional context
Run npm run typecheck
in the provided repro.
I'll add a PR soon.
@danielroe just a friendly ping :)