How to add type definition for function `ref` params
Version
3.2.6
Reproduction link
Steps to reproduce
vscode will show type incompatible
What is expected?
No error message
What is actually happening?
import type { ComponentPublicInstance } from 'vue'
function setItemRef(ref: Element | ComponentPublicInstance ) {
if(ref) {
liRefs.push(ref)
}
}
import type { ComponentPublicInstance } from 'vue' function setItemRef(ref: Element | ComponentPublicInstance ) { if(ref) { liRefs.push(ref) } }
Yes, i know that ,just i think it's too verbose.