Skip to content

Add type for 'v-sanitize-html' directive #1

Description

@benedictleejh

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions