question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v0.40.0 template type problems

See original GitHub issue

Hi,

Since upgrading to v0.40.0 some of my Vue component templates stopped detecting types, e.g. on hover where I see a type in v0.39.5 I don’t see it anymore in v0.40.0.

I also see some of variables, for example computed property defined in script setup marked as not used, even though I’m using them in the template.

Sorry for being sparse with the details, I just am not sure what else than version number and behavior I could provide 😊

[edit] I also found out that when I run Volar: Verify All Scripts in v0.40.0 I got about 5 errors, but I get none in v0.39.5 and I’m almost certain that errors are false positives.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jfrscommented, Aug 10, 2022

I have the same issue, and every time the variable/function is used in a v-else block.

<script setup lang="ts">
  const thing = 42; // 'thing' is declared but its value is never read. ts(6133)
</script>

<template>
  <div v-if="true"></div>
  <div v-else>{{ thing }}</div>
</template>
0reactions
danielwaltzcommented, Aug 10, 2022

The target in my tsconfig is indeed set to 2.7 already, but that is a really good thought!

I also just tested out enabling the experimentalImplicitWrapComponentOptionsWithVue2Extend option and unfortunately it still does not fix template type checking in components not using <script setup>.

Really appreciate the additional information on a version locking feature too, it’s true that Microsoft supporting extension version locking in their workspace recommendations would also be an excellent solution. Understandable with the speed of iteration that now maybe wouldn’t be the best time for that feature. Still hoping for it one day!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ytt - ytt vs x - Carvel tools
ytt operates on YAML structures, hence typical escaping and formatting problems common to text templating tools are eliminated. Additionally, ytt provides a ...
Read more >
Config - Go Packages
WriteConfigFile renders config using the template and writes it to configFilePath. Types ¶. type APIConfig ¶ added in v0.40.0. type APIConfig ...
Read more >
Callback Gotchas | Dash for Python Documentation | Plotly
Prior to v0.40.0, setProps was only defined if the component was connected to a callback. This required complex state management within the component...
Read more >
How Do I Write Policies? - Open Policy Agent
Use Rego for defining policy that is easy to read and write. Rego focuses on providing powerful support for referencing nested documents and...
Read more >
Release Notes - CFCR - Cloud Foundry Documentation
type : replace path: /variables/- value: name: etcd_ca options: common_name: etcd.ca ... Known Issue There is an issue with deploying cfcr v0.20 in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found