Skip to content

Global Component Types

David Matter edited this page Aug 29, 2024 · 2 revisions

After registering your global components you can register them in the GlobalComponents interface.

Type declaration

Add a declaration file, eg. globals.d.ts:

import {default as Test} from './src/Test.vue'

export {}

declare module 'vue' {
  export interface GlobalComponents {
    Test: typeof Test
  }
}
Clone this wiki locally