-
-
Notifications
You must be signed in to change notification settings - Fork 440
HTMLElement type is automatically expanded #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This may just a vue type problem. Please try move the code to |
sorry, I don’t understand too much, what's that mean "Please try move the code to |
Create foo.ts under same directory with Dropdown.vue, copy the Dropdown.ts script block code to foo.ts, and then check the error whether reproduce in foo.ts. (Similar to #415 (comment)) |
|
That confirmed this is pure TS problem not volar problem, please ask in Vue Land TS discord server. |
ok ,thanks |
1 . define a custom hook useClickOutside and recive a argument elementRef ,the elementRef type is Ref<null | HTMLElement>
2. define a dropdownRef type is null or HTMLElement
3. template has a div set ref attribute dropdownRef
Result :
Here I think there may be a problem with the implementation of volar. It will directly expand the HTMLElement type, causing a mismatch of types.
The text was updated successfully, but these errors were encountered: