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

[vue-tsc & vscode volar] wrong function ref "el" param type gets evaluated as type any #1032

Closed
D4RKAR117 opened this issue Mar 13, 2022 · 1 comment
Labels

Comments

@D4RKAR117
Copy link

D4RKAR117 commented Mar 13, 2022

Hello currently, volar with takeover mode in vscode and vue-tsc evals template refs functions refs aka :ref callback, has the same behavior described in the issue #473
image

Maybe related with this identified issue at @vue/core ? . idk if this can affect at any level the type evaluation of volar

Repro at stack blitz here

Versions in the repro cases:

  • Vue: 3.2.31
  • vue-tsc / volar 0.32.1
@D4RKAR117 D4RKAR117 changed the title [vue-tsc & vscode volar] wrong function ref "el" param type gets evaluates with type any [vue-tsc & vscode volar] wrong function ref "el" param type gets evaluated as type any Mar 13, 2022
@johnsoncodehk
Copy link
Member

Hi @D4RKAR117, this is vue types issue, please forward to vue repo.

<script setup lang="tsx">
import Test from './components/Test.vue';

(<Test ref={el => {}} />); // Parameter 'el' implicitly has an 'any' type.ts(7006)
</script>

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

No branches or pull requests

2 participants