Closed lijialiang closed 3 years ago
vue-tsc v0.0.24
<template> <p v-if="fruit === Fruit.apple"> apple </p> </template> <script lang="ts" setup> enum Fruit { apple = 0, banana = 1 } const fruit = 0 </script>
$ npx vue-tsc --noEmit // error src/views/test.vue:2:22 - error TS2552: Cannot find name 'Fruit'. Did you mean 'fruit'? 2 <p v-if="fruit === Fruit.apple">
Upgrade version to v0.2.2 Solved :)
vue-tsc v0.0.24