Recently, we initiated the process of upgrading from Quasar v1 to Quasar v2 (moving from Vue 2 to Vue 3).
In the past, this code functioned without any issues:
// src/pages/myComponent.vue
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
props: {
appId: {
type: String,
required: true,
},
},
setup(props) {
if (!props.appId) {
console.error('No application ID provided to load the correct form')
}
},
})
</script>
However, when transitioning to Vue 3, we encountered an eslint warning:
WARNING in src/pages/myComponent.vue @typescript-eslint/no-unsafe-member-access: Unsafe member access .appId on an
any
value.
It appears that props
is consistently identified as type any
, despite vscode showing the correct types upon hovering:
https://i.sstatic.net/44FRa.png
We have also adhered to the Vue 3 recommendations. Can anyone point out what we might be overlooking?