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

Typecheck token implicitly has 'any' type #127

Closed
dnlsndr opened this issue Jan 23, 2023 · 1 comment
Closed

Typecheck token implicitly has 'any' type #127

dnlsndr opened this issue Jan 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dnlsndr
Copy link
Contributor

dnlsndr commented Jan 23, 2023

🐛 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.

@dnlsndr dnlsndr added the bug Something isn't working label Jan 23, 2023
@dnlsndr
Copy link
Contributor Author

dnlsndr commented Jan 27, 2023

@danielroe just a friendly ping :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant