We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have simple code in template:
<a href="https://github.com/cawa-93/anime-library/issues/new/choose" @click.prevent="openURL($event.target.href)" >🐞 Bug</a>
And I got TS error:
error TS2531: Object is possibly 'null'. @click.prevent="openURL($event.target.href)" ~~~~~~~~~~~~~ error TS2339: Property 'href' does not exist on type 'EventTarget'. @click.prevent="openURL($event.target.href)" ~~~~
It would be fantastic if the TS determined that
EventTarget
HTMLAnchorElement
I use vue-tsc with PhpSthorm if this have matter
vue-tsc
The text was updated successfully, but these errors were encountered:
Event types is upstream problem, it's define in vue-next: https://github.com/vuejs/vue-next/blob/ecd97ee6e465ec5c841d58d96833fece4e899785/packages/runtime-dom/types/jsx.d.ts#L1183-L1297
Please wait for TS support in template: vuejs/core#1359 You can do this after it's supported openURL(($event.target as HTMLAnchorElement).href).
openURL(($event.target as HTMLAnchorElement).href)
Sorry, something went wrong.
No branches or pull requests
I have simple code in template:
And I got TS error:
It would be fantastic if the TS determined that
EventTarget
actually isHTMLAnchorElement
I use
vue-tsc
with PhpSthorm if this have matterThe text was updated successfully, but these errors were encountered: