vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 594 forks source link

highlight error when use typeof in v-if #3679

Open wlchn opened 1 year ago

wlchn commented 1 year ago

Info

Problem

highlight error when use typeof in v-if

Reproducible Case

wrong case: image

<template>
  <div>
    <div v-if="typeof foo === 'number'">demo text</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      foo: '',
    }
  },
}
</script>

right cases: image image

andretf commented 1 year ago

Had the same issue, turns out, the guilty was Vue Syntax Highlight by rahul Kadyan (https://marketplace.visualstudio.com/items?itemName=znck.vue-language-features)