With the GlobalDirectives interface in Vue 3.5, it is possible to inform the language tools of the existence of a directive and allow it to provide autocompletion when attempting to use a directive. Adding vSanitizeHtml to the GlobalDirectives interface would allow Volar to provide autocompletion for v-sanitize-html, along with useful documentation in a tooltip.
This could be as straightforward as:
declare module 'vue' {
interface GlobalDirectives{
vSanitizeHtml: Directive;
}
}
But there may be a more useful type for vSanitizeHtml.
Relevant Vue PR: vuejs/core#3399
With the
GlobalDirectivesinterface in Vue 3.5, it is possible to inform the language tools of the existence of a directive and allow it to provide autocompletion when attempting to use a directive. AddingvSanitizeHtmlto theGlobalDirectivesinterface would allow Volar to provide autocompletion forv-sanitize-html, along with useful documentation in a tooltip.This could be as straightforward as:
But there may be a more useful type for
vSanitizeHtml.Relevant Vue PR: vuejs/core#3399