Closed aturingmachine closed 1 month ago
I'm running into this too, I was just about to open a ticket myself 🙂
https://github.com/scottbedard/vue-tsc-event-listener-type-error
This appears to be a bug though, Vue supports this syntax. Looking more at the compiled output, everything appears normal. The keydown
listeners appear to be compiling correctly.
function render(_ctx, _cache, $props, $setup, $data, $options) {
return (_openBlock(), _createElementBlock("input", {
onKeydown: [
$setup.onKeydown,
_withKeys($setup.onEnter, ["enter"])
]
}, null, 32 /* NEED_HYDRATION */))
}
Description
The following template (an excerpt) will be fine when
vue-tsc
is run using version 2.0.16, however will throw errors on 2.0.17.Error:
More Info
Our codebase is Nuxt, and we run typecheck via
nuxi typecheck
which runsvue-tsc
vianpx
. Meaning this failure popped on our GitHub Actions where thenpx
cache missesvue-tsc
and installsv2.0.17
, however our local environments havev2.0.16
cached and do not report the error.