vueCompilerOptions.checkUnknownDirectives
requires directives to be prefixed with v
in Options API
#5292
Labels
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
🔨 p3-minor-bug
Vue - Official extension or vue-tsc version
2.2.8
VSCode version
Vue version
3.5.13
TypeScript version
8.27.0
System Info
package.json dependencies
Steps to reproduce
tsconfig.app.json
, addvueCompilerOptions.strictTemplates: true
:Create a component with options API
Register a custom directive
focus
:Include it in the template with
v-focus
What is expected?
There should be no type error.
What is actually happening?
The type error disappears when I register the tooltip with a
v
prefix, but then it won't work at runtime.Link to minimal reproduction
https://github.com/johannes-lindgren/vuejs_language-tools_-checkUnknownDirectives-bug
Any additional comments?
There is an ugly workaround: create a second
<script setup lang="ts">
:However, this only gets you to get past CI: you can still screw up and TypeScript won't notice it.
The text was updated successfully, but these errors were encountered: