Closed slauzinho closed 3 years ago
I got an issue with the new vue-tsc version 0.2.2. If I have this code:
0.2.2
const card = ref<HTMLElement | string>(''); const logCardInfo = (card: Ref<HTMLElement | string>) => { console.log(card.value); } logCardInfo(card); // This line gives a typescript error
I get the following typescript error:
Argument of type 'Ref<string | { accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; innerText: string; lang: string; readonly offsetHeight: number; ... 233 more ...; focus: (options?: FocusOptions | undefined) => void; }>' is not assignable to parameter of type 'Ref<string | HTMLElement>'.
I also creted a demo app with a repro: https://github.com/slauzinho/vue-tsc-demo-app/blob/master/src/App.vue
vue version: 3.1.5 vue-tsc version: 0.2.2 typescript version: 4.3.5
3.1.5
4.3.5
Had no issues with vue-tsc 0.2.1
This is vue 3.1.5 ref type problem, vue 3.2 beta fixed it.
I got an issue with the new vue-tsc version
0.2.2
. If I have this code:I get the following typescript error:
I also creted a demo app with a repro: https://github.com/slauzinho/vue-tsc-demo-app/blob/master/src/App.vue
vue version:
3.1.5
vue-tsc version:0.2.2
typescript version:4.3.5
Had no issues with vue-tsc 0.2.1