28 lines
695 B
TypeScript
28 lines
695 B
TypeScript
import type emmiter from '~/plugins/emmiter.ts';
|
|
|
|
interface PluginsInjections {
|
|
$bus: ReturnType<typeof emmiter>
|
|
}
|
|
|
|
declare module '#app' {
|
|
interface NuxtApp extends PluginsInjections {}
|
|
}
|
|
|
|
declare module 'nuxt/dist/app/nuxt' {
|
|
interface NuxtApp extends PluginsInjections {}
|
|
}
|
|
|
|
declare module '@vue/runtime-core' {
|
|
interface ComponentCustomProperties extends PluginsInjections {}
|
|
}
|
|
|
|
// 1. Make sure to import 'vue' before declaring augmented types
|
|
|
|
// 2. Specify a file with the types you want to augment
|
|
// Vue has the constructor type in types/vue.d.ts
|
|
declare module 'vue/types/vue' {
|
|
// 3. Declare augmentation for Vue
|
|
interface Vue {
|
|
$bus: string
|
|
}
|
|
}
|