Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/guide/typescript/composition-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,15 @@ Note that with `@vue/language-tools` 2.1+, static template refs' types can be au

## Typing Global Custom Directives {#typing-global-custom-directives}

In order to get type hints and type checking for global custom directives declared with `app.directive()`, you can extend `ComponentCustomProperties`
In order to get type hints and type checking for global custom directives declared with `app.directive()`, you can extend `GlobalDirectives`

```ts [src/directives/highlight.ts]
import type { Directive } from 'vue'

export type HighlightDirective = Directive<HTMLElement, string>

declare module 'vue' {
export interface ComponentCustomProperties {
export interface GlobalDirectives {
// prefix with v (v-highlight)
vHighlight: HighlightDirective
}
Expand Down